NuGet:远程服务器返回错误(403)禁止
每当我尝试安装软件包时,我都会收到此错误
remote server returned an Error(403) Forbidden
,我可以使用其他命令,例如 get-package -ListAvailable,并发现已安装的软件包是否有任何更新,但实际上无法通过 Nuget 安装任何内容。
这对于命令行和包管理器 GUI 来说是相同的。
我正在使用 Visual Web Developer 2010。
我也在公司环境中,我怀疑这是主要问题。
有什么可能的指点吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我有类似的问题。我正在使用 Visual Studio 2019。当我更改系统密码时,问题就开始了。
有时清除 Nuget 缓存可以解决该问题。
在 VS 中,转到“工具”>“工具”>选项> NuGet 包管理器 >单击“清除所有 NuGet 缓存”
如果这不能解决问题,请按照以下步骤操作。
重置 Nuget 工件可以解决该问题。我解决的方法如下:
如果控制面板处于
图标(大或小)模式
转到控制面板> >凭证管理器>单击 Windows 凭据
如果控制面板处于
类别模式
转到控制面板 >用户帐户>凭证管理器>单击 Windows Credentials
在展开的部分上找到带有
VSCredentials_
前缀 > 的所有节点点击它>单击编辑按钮>更新您当前的系统密码。重新启动所有 Visual Studio 实例并清除临时文件 (
C:\Users\Home\AppData\Local\Temp
)。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
).你用的是TFS吗?它似乎会导致奇怪的问题,论坛中有关于删除 DLL 来解决它的信息:
http://nuget .codeplex.com/discussions/246381
如果不是这样 - 是否有可能您有一个 NuGet 无法正确进行身份验证的代理? bugtracker 中有一个与此相关的问题:
http://nupack.codeplex.com/workitem/231
看起来它最近可能已被修复(尽管不确定它是否已进入发布的版本)。
如果失败,您可以使用 Fiddler 捕获确切的请求并在此处发布详细信息吗?
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?
看看这个讨论:
http://nuget.codeplex.com/discussions/254328
和我使用的解决方案:
http://blog.rthand.com/post/2011/08/26/Fishing-combination-of-NuGet-and-Team-Foundation-in-workgroup-configuration-401-Unauthorized.aspx< /a>
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
我发现我工作的公司正在阻止 https://visualstudiogallery.msdn.microsoft。 com/services/dev12/extension.svc。
当他们解封后,问题就解决了。
I found the company I worked for was blocking https://visualstudiogallery.msdn.microsoft.com/services/dev12/extension.svc.
When they unblocked it the problem was solved.
当我将应用程序升级到 .Net Framework 4.5.2 时,问题突然出现。该应用程序是一个旧应用程序,使用 TFS 2010,因此答案让我感到惊讶。首先,我通过 NuGet 网站上的电子邮件与 NuGet 支持取得联系。我很惊讶他们回复的速度如此之快。
他们向我推荐了这个链接。
http://www.xavierdecoster.com/migrate-away -from-msbuild-based-nuget-package-restore
它看起来没有解决方案,但我发现它有。我的 NuGet 配置已过时,我必须更改它。
The problem cropped up with me when I was upgrading my application for the .Net Framework 4.5.2. The application was an old one, using TFS 2010, and so the answer surprised me. First I got in touch with NuGet Support via email on the NuGet website. I was surprised how quickly they replied.
They referred me to this link.
http://www.xavierdecoster.com/migrate-away-from-msbuild-based-nuget-package-restore
It didn't look like it had the solution, but I found it did. My NuGet configuration was out of date and I had to change it.