'Nuget throwing 401 unauthorized error for no apparent reason

I'm using VS2015 and Nuget to install external packages. Everything was working fine until today when Nuget started spitting out a:

Response status code does not indicate success: 401 (Unauthorized)

I tried looking around for a solution, everyone is suggesting to provide again the credentials, either from the console or the UI under tools -> nuget package manager -> manage nuget packages for solution

No luck, what's going on here?



Solution 1:[1]

Solved, I had to re-add my NuGet repository specifying username and password. For some reason VS2015 lost the credentials

Solution 2:[2]

I've faced this problem recently. The reason was password expiration for the user in the NuGet.config. After resetting, everything worked fine.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gianluca Ghettini
Solution 2 Ramazan Kilimci