Fixed “Updating from such a repository can’t be done securely” Error In Linux
This blog post is for you if you are having error like:
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg
These sort of errors normally occurs when you are trying to run the apt update
or the apt upgrade
command. Let’s have a look into the solution for this error. There are multiple solution for this.
Fix “Updating from such a repository can’t be done securely” Error In Linux
Method 1:
Disable the repositories that are causing trouble
Sometime, The reason for the error “Updating from such a repository can’t be done securely” can be the troublesome repositories. You can simply disable the repositories that are causing trouble. Go through the following steps to disable the repos:
- Open the software updater
- Under the Other Software tab, find the concerned repositories and uncheck them
- Close the software updater
Now, Run the following command to update your Ubuntu:
sudo
apt update
Method 2:
Adding an unsigned repository with a flag in Linux
One of the reason can be an unsigned repository. So, Fix the problem by adding an unsigned repository with a flag in Linux. You can do it by adding it in your sources.list
file. You can open the sources.list
file using a text editor:
sudo vi/etc/apt/sources.list
Now, you need to add the following line to the source you are using:
[trusted=
yes
]
Save and exit using the ESC key then :wq!
After making changes, run the following command to update:
sudo apt-get update
Method 3:
Bypass the safeguard in Linux
This method lets you to install packages without any errors. You can bypass the authentication safety measures and installed the packages without any issue.
--allow-unauthenticated
Summary: In this post, we have shown you the 3 multiple methods to fix “Updating from such a repository can’t be done securely” error In Linux. Let us if you know any other method to fix it.