When working with Kali Linux, especially after a fresh install or network change, you may encounter an error while updating your system using apt update. One of the most common issues is a 403 Forbidden error related to the Kali repositories.
In this post, I’ll guide you step by step to fix it quickly and safely.
When you run:
sudo apt update
You might see an error like this:
Err:1 http://http.kali.org/kali kali-rolling InRelease
403 Forbidden [IP: 99.99.99.99 80]
Error: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
This usually happens when your system is trying to reach the Kali repository using http instead of the secure https:
First, make sure your network is working properly:
ping google.com
If you see replies, you’re connected.
Now let's update your APT repository source to use HTTPS.
Open the sources file with:
sudo nano /etc/apt/sources.list
Find this line:
deb http://http.kali.org/kali kali-rolling main non-free contrib
Change it to:
deb https://http.kali.org/kali kali-rolling main non-free contrib
Switching from http to https makes the connection secure and avoids the 403 error.
Save the file:
Press ' CTRL + O ' then ' ENTER ' to save
Press ' CTRL + X ' to exit
Now retry the update command:
sudo apt update
You should see:
Hit:1 https://http.kali.org/kali kali-rolling InRelease
1297 packages can be upgraded. Run 'apt list --upgradable' to see them.
Success!
If you want to see what’s new:
apt list --upgradable
To fully update your system:
sudo apt full-upgrade -y
That’s it! You’ve fixed the 403 Forbidden error and updated your Kali Linux system successfully. Remember to always use secure https repositories to avoid future issues. This small tweak helps keep your system secure and stable.
If you found this post helpful, feel free to share it with fellow ethical hackers or Linux enthusiasts. Happy hacking.
Ali Gunes
Designed and coded by Ali Gunes
© 2024