简体   繁体   English

尝试将包推送到 nuget.org 时出现 403

[英]Getting 403 when trying to push packages to nuget.org

I've been following this document on How to Publish a Package to nuget.org gallery, and I keep getting 403 forbidden.我一直在关注这篇关于如何将 Package 发布到 nuget.org画廊的文档,并且一直被禁止 403。

I've done the following steps:我已经完成了以下步骤:

  1. Browsed to my account in nuget.org.在 nuget.org 中浏览到我的帐户。

  2. Clicked on my name -> API Keys点击我的名字 -> API Keys

  3. Created an API key as such:创建了一个 API 密钥,如下所示: 在此处输入图像描述

  4. I already have a.nupkg file, so now I try:我已经有一个 .nupkg 文件,所以现在我尝试:

$ nuget.exe push .\Test.1.2.3.nupkg -Source https://api.nuget.org/v3/index.json -Apikey <apikey>

And I keep getting:我不断得到:

Pushing Test.1.2.3.nupkg to 'https://www.nuget.org/api/v2/package'...
  PUT https://www.nuget.org/api/v2/package/
  Forbidden https://www.nuget.org/api/v2/package/ 2238ms
Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.).

Why is that??这是为什么??

The error message said "The specified API key is invalid, has expired, or does not have permission to access the specified package."错误消息为“指定的 API 密钥无效、已过期或无权访问指定的 package。”

We can see from this page that我们可以从这个页面看到> 如果返回API密钥页面,需要重新生成密钥进行复制

Regenerate the API key and try again.重新生成 API 密钥并重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用-source参数的NuGet Install Packages不会下载nuget.org - NuGet Install Packages with -source parameter isn't downloading nuget.org Visual Studio 2015 Update 2中的Nuget.org不会获取nuget包 - Nuget.org in visual studio 2015 update 2 wont get nuget packages VSTS 包源不从上游源 (nuget.org) 拉包 - VSTS package feed not pulling packages from upstream source (nuget.org) 将 NuGet package 推送到 nuget.org 时,如何发布文档? - How can I publish documentation when pushing a NuGet package to nuget.org? 错误 NU1101:无法找到包 &#39;&#39;。 源中不存在具有此 ID 的包:Microsoft Visual Studio 离线包,nuget.org - error NU1101: Unable to find package ''. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org “无法解析远程名称:&#39;nuget.org&#39;” - “The remote name could not be resolved: 'nuget.org'” nuget.org和api.nuget.org有什么区别 - what is difference between nuget.org and api.nuget.org nuget.org-使用Update-Package时如何防止下载未列出的软件包 - nuget.org - how to prevent unlisted package from being downloaded when Update-Package is being used 有没有办法按上次更新日期对 nuget.org 结果进行排序? - Is there a way to sort nuget.org results by last updated date? Visual Studio 无法连接到 Windows 上的 Nuget.org 7 - Visual Studio cannot connect to Nuget.org on Windows 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM