How To Fix “Updating from such a repository can’t be done securely” Error In Linux

How To Fix “Updating from such a repository can’t be done securely” Error In Linux

Sometime, You will come across this “Updating from such a repository can’t be done securely” error message in Linux while trying to execute the apt update or the apt upgrade command. Not only this, you will also come across the “W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg: error.

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

How To Fix “Updating from such a repository can’t be done securely” Error In Linux

There are multiple ways to fix this error. We will take you through the each and every methods.

In this method,we will bypass the safety measures in Linux.

How to Bypass the safeguard in Linux

Run the following command to bypass the authentication safety measures and allow the package to be installed without dealing with any errors.

--allow-unauthenticated

In this method, we will figure out the repositories causing issues and disabling it.

How to Disable the repositories that are causing trouble in Linux

This is GUI method where you need to open the software updater. Under the Other Software tab, find the concerned repositories that is creating issues and uncheck them and exit the software updater.

Run the following command:
sudo apt update

In this method, we will add an unsigned repos with a flag

How to Add an unsigned repository with a flag in Linux

Open the sources.list file using your favourite text editor:

sudo vi/etc/apt/sources.list

and add the following option to the source you are using:
[trusted=yes]

Save and exit then :wq!

Run a sudo apt-get update command and at this moment, your problem should be solved.

 

Summary: In this post, we guided you through the steps to solve “Updating from such a repository can’t be done securely” Error In Linux. Let us know if you have any other solutions for this.

Leave a Comment