NuGet Push错误500(无代理),错误503(有代理)

时间:2019-10-07 11:09:34

标签: azure-devops nuget

我尝试将nupkg推送到Azure DevOps服务器中的工件。 网络位于代理后面,因此我的C:\Users\user\AppData\Roaming\NuGet\NuGet.Config如下:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="FrameworkA" value="http://xfc-l-s6fc5086:8070/Samples/_packaging/FrameworkA/nuget/v3/index.json" />
  </packageSources>
  <config>
    <add key="http_proxy" value="http://my-proxy:8000" />
    <add key="http_proxy.user" value="domain\user" />
    <add key="http_proxy.password" value="*** windows security key ***" />
  </config>
</configuration>

从我的feed(Azure DevOps)页面中,我获得以下信息:

enter image description here


所以,如果我执行:

nuget.exe push -Source "FrameworkA" -ApiKey AzureDevOps .\FrameworkA.1.0.0.nupkg

我得到:

The response status code does not indicate success: 503 (Service Unavailable).

我从nuget.config中删除了代理信息,然后得到了

The response status code is unsuccessful: 500 (Internal Server Error - Error retrieving data from the upstream packet source https://api.nuget.org/v3/index.json): Error sending the request. (DevOps activity ID: 69FB4414-ED0B-4367-B121-B0DC9B366367)).

当我删除条目时,我也会得到这个提示:

<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />

这里出了什么问题?是否有人在代理后使用Azure DevOps Server的经验? (使用Azure devops服务器的其他所有设备都可以正常工作,REST API,自定义扩展,构建和发布任务等)

版本:17.143.28912.1(AzureDevOps2019.0.1)

1 个答案:

答案 0 :(得分:0)

由于打字错误,我得到了相同的解决方法。如果我将DevOps添加为代理服务器,那么它将起作用。

scanf("%zu", &num)

在我看来,这很有用。 IDK为什么!