NuGet: remote server returned an Error(403) Forbidden

25,144

Solution 1

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?

Solution 2

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).

Solution 3

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

Share:
25,144
MrBliz
Author by

MrBliz

Updated on September 10, 2021

Comments

  • MrBliz
    MrBliz over 2 years

    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?

  • MrBliz
    MrBliz about 13 years
    Not using TFS. I suspect it's to do with the fact that every download gets routed through a scanner that blocks certain types of downloads.
  • MrBliz
    MrBliz over 12 years
    Thanks, The problem seems to have magically disappeared since i updated to Nuget 1.4, but it never was a TFS issue anyway.
  • MrBliz
    MrBliz over 12 years
    I'll accept the second one as the answer since it's gone away since i updated to Nuget 1.4
  • Deantwo
    Deantwo about 2 years
    Both links are dead.