-2

Image -> https://postimg.cc/WtZ6QD3V <-Image

Hi all,

I just installed Kali Linux and ran:

sudo apt update 

But I got this error:

GPG error: http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 827CB569F2518CC677FECA1AED65462ECB5E4C5 E: The repository is not signed. 

I also saw warnings about apt-key being deprecated, and attempts to use curl | gpg returned a 404.


What I Want: I don’t care about using the Tsinghua mirror — I just want a clean fix using the official Kali sources and keys.


What I’ve Tried:

  • Replacing the mirror in /etc/apt/sources.list with the official Kali one.
  • Using the modern gpg --dearmor method to import the official Kali archive key.

My sources.list [I copied it from chatgpt, its not the default one]

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/ deb [signed-by=/etc/apt/keyrings/tuna-kali.gpg] http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main non-free contrib # Additional line for source packages # deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware 

Thanks in advance!

1

1 Answer 1

1

You need to follow the instructions given by Kali themselves:

sudo wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg 

You also need to use the correct sources.list:

deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware 
4
  • 2
    You’d be better off checking the Kali docs than asking ChatGPT. That signed-by option is what’s breaking your setup. See the updated answer. Commented Jul 29 at 16:32
  • I am a newbie so I am not quite familiar with linux docs btw thank you very much I have been struggling with this from past few hours I got one more problem when I update all the packages my system breaks and shows "something went wrong your system cannot be restored". So what to do about it? Commented Jul 29 at 16:41
  • 2
    @Narci if you are a newbie, welcome! But also, please consider not using Kali. Kali is not a regular operating system and everything is harder than it needs to be. And there's nothing special about it either: anything you can do on Kali, you can also do on Linux Mint, or Debian, or Ubuntu, or Fedora, or any Linux distribution. Using Kali will only make your life harder and won't allow you to do anything you couldn't do with a normal system. Please see kali.org/docs/introduction/should-i-use-kali-linux Commented Jul 29 at 16:45
  • 1
    @Narci Why would you trust an answer from ChatGPT over what the Kali site itself provides? Commented Jul 29 at 17:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.