Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuGet: remote server returned an Error(403) Forbidden

Whenever i attempt to install a package i get this error

remote server returned an Error(403) Forbidden

I can use other commands, such as get-package -ListAvailable, and discover whether there are any updates for installed packages but cannot actually install anything via Nuget.

This is the same for the command line and the package manager GUI.

I'm using Visual Web Developer 2010.

I'm in a corporate environment too, which i suspect is the chief issue.

Any possible pointers?

like image 255
MrBliz Avatar asked May 24 '11 12:05

MrBliz


3 Answers

I have similar issue. I am using Visual Studio 2019. The problem started when I change my system password.

Sometimes clearing Nuget caches solve the issue.

In VS, Go to Tools > Options > NuGet Package Manager > Click on Clear All NuGet Caches(s)

If that does not solve the issue, then follow below steps.

Reset Nuget artifactory can resolve the issue. The way I resolved is as following:

If Control Panel is in Icon (Large or Small) mode

Go to Control Panel > Credential Manager > Click on Windows Credentials

If Control Panel is in Category mode

Go to Control Panel > User Accounts > Credential Manager > Click on Windows Credentials

On the expanded part find all nodes with VSCredentials_ prefix > Click on it > Click on Edit button > Update your current system password.

Restart all Visual Studio instances and clear temp files (C:\Users\Home\AppData\Local\Temp).

like image 191
Kuntal Ghosh Avatar answered Oct 05 '22 23:10

Kuntal Ghosh


Are you using TFS? It seems to cause weird problems, there's info in the forums about removing a DLL to workaround it:

http://nuget.codeplex.com/discussions/246381

If it's not that - is it possible you have a proxy that NuGet isn't authenticating with properly? There's an issue in the bugtracker about this:

http://nupack.codeplex.com/workitem/231

Looks like it may have been fixed recently (though not sure if it's made it into a released build yet).

Failing that, could you capture the exact request with Fiddler and post details here?

like image 35
Danny Tuppeny Avatar answered Oct 06 '22 01:10

Danny Tuppeny


Have a look at this discussion:

http://nuget.codeplex.com/discussions/254328

and the solution i used:

http://blog.rthand.com/post/2011/08/26/Fixing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx

like image 36
Valamas Avatar answered Oct 05 '22 23:10

Valamas