apt-get add new data source

When we add new data:

# vi /etc/apt/sources.list
...
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

we got some errors below:

# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Fetched 172 kB in 2s (73.3 kB/s)
Reading package lists... Done
root@netsgn:~/soft# nano /etc/apt/sources.list
root@netsgn:~/soft# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 https://packagecloud.io/grafana/stable/debian stretch InRelease [23.2 kB]
Err:4 https://packagecloud.io/grafana/stable/debian stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 37BBEE3F7AD95B3F

Fix:

# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

If we receive an error likeĀ  below, it looks like you are behind firewall:

Executing: /tmp/apt-key-gpghome.04owBwsfXq/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
gpg: keyserver receive failed: End of file

Some command to debug:

soft#  gpg -vvv --debug-all --recv-keys --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

 

Leave a Reply

Your email address will not be published. Required fields are marked *