23

I cannot update my Kali Linux, when trying to execute apt-get update I get this error message:

# apt-get update

Get:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease [30.5 kB]
Err:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Reading package lists... Done
W: GPG error: http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
E: The repository 'http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

If you need my kernel version:

# uname -a
4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux

How can I fix this?

  • 4
    Why is this getting downvoted? May be a simple question (and a fair one at that), but not everyone is up-to-the-minute on everything going on with Debian/Kali... – Jesse Feb 5 '18 at 17:40
  • 1
    @Jesse People could look at the front page of Kali, use Google or search here. That one pops by a couple of times a day here, and I am not exagerating by a long stretch. It shows a lack of research... – Rui F Ribeiro Feb 14 '18 at 11:33
  • 2
    I don’t believe that was the case at the time this question was asked. I landed on this question by using Google. – Jesse Feb 15 '18 at 15:27
33

Add the gpg key:

gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6

Check the fingerprint:

gpg --fingerprint 7D8D0BF6

Sample output:

pub   rsa4096 2012-03-05 [SC] [expires: 2021-02-03]
      44C6 513A 8E4F B3D3 0875  F758 ED44 4FF0 7D8D 0BF6
uid           [ unknown] Kali Linux Repository <devel@kali.org>
sub   rsa4096 2012-03-05 [E] [expires: 2021-02-03]

then :

gpg -a --export 7D8D0BF6 | apt-key add -
apt update

Debian : SecureApt

update : 8 Feb , 2018.

Answer from the official documentation :

Note that if you haven’t updated your Kali installation in some time (tsk2), you will like receive a GPG error about the repository key being expired (ED444FF07D8D0BF6). Fortunately, this issue is quickly resolved by running the following as root:

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add
15

Download the key of the kali package repository with this command:

wget -q -O - archive.kali.org/archive-key.asc | apt-key add

then run the update.

7

This is built in. You don't need to get it from an external source.

$ sudo apt install kali-archive-keyring

I'm using a system that adds Kali to a Debian base, so I had to specify the release. You can check that as follows:

$ apt policy kali-archive-keyring
  Installed: 2015.2
  Candidate: 2015.2
  Version table:
     2018.1 1
          1 http://http.kali.org/kali kali-rolling/main amd64 Packages
          1 http://http.kali.org/kali kali-rolling/main i386 Packages
 *** 2015.2 100
        100 /var/lib/dpkg/status

$ sudo apt install kali-archive-keyring/kali-rolling

This way, you don't have to blindly trust that you're importing the right key in order to prevent a man-in-the-middle attack since the new key is signed by the old one within the repository.

6

As Kali Linux published in Twitter, your archive-keyring package is outdated. You need to update it by executing this (as root):

wget -q -O - https://archive.kali.org/archive-key.asc  | apt-key add
2

Execute these commands as root to fix your issue:

wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.1_all.deb
apt install ./kali-archive-keyring_2018.1_all.deb
0

(The point is not only solving the problem but also knowing why it is giving problem).

If you haven’t updated your Kali installation in some time (tsk2), you will like receive a GPG error about the repository key being expired (ED444FF07D8D0BF6). Fortunately, this issue is quickly resolved by running the following as root:

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

protected by Community Mar 6 '18 at 10:27

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.