NuGet:远程服务器返回错误(403)禁止

发布于 2024-11-09 13:25:11 字数 310 浏览 3 评论 0原文

每当我尝试安装软件包时,我都会收到此错误

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

转身以后 2024-11-16 13:25:11

我有类似的问题。我正在使用 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).

油焖大侠 2024-11-16 13:25:11

你用的是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?

娇纵 2024-11-16 13:25:11

我发现我工作的公司正在阻止 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.

丢了幸福的猪 2024-11-16 13:25:11

当我将应用程序升级到 .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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文