【问题标题】:NuGet Push Error 500 (without Proxy), Error 503 (with Proxy)NuGet 推送错误 500(不带代理)、错误 503(带代理)
【发布时间】:2019-10-07 11:09:34
【问题描述】:

我尝试将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>

从我的提要 (Azure DevOps) 页面,我得到以下信息:


所以如果我执行:

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

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

&lt;add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /&gt;

这里出了什么问题?有人在代理后面使用过 Azure DevOps Server 吗? (使用 azure devops 服务器的其他一切都可以正常工作,REST API、自定义扩展、构建和发布任务等等)

版本:17.143.28912.1 (AzureDevOps2019.0.1)

【问题讨论】:

  • 您是否在您的环境中设置了任何代理?如果是,请尝试将其删除,然后重新推送包以检查是否仍然存在此问题。
  • @Joy 感谢您的意见。我在 Windows 代理设置中尝试了不同的东西:1.use proxy server 切换为 false 2. 通过传递将服务器 ip 添加到代理 3.do not use proxy server for internal adresses 切换为真/假。在每种情况下,我都会在nuget.config 中使用和不使用代理设置多次尝试。没有任何变化,所有错误消息都是一样的,有些情况500,有些情况503。我也尝试使用浏览器手动访问 feed.json,我意识到我只能使用基于 num 的服务器的 ip 版本(http://138.202.16.216:8070/Sa...

标签: azure-devops nuget


【解决方案1】:

由于拼写错误,我得到了相同的解决方案。如果我将 DevOps 添加为代理,它就可以工作。

<add key="http_proxy" value="http://devops.yourdomain:8080" /> 

这对我来说很有效。 IDK 为什么!

【讨论】:

  • 不幸的是,这对我没有帮助,但感谢您的意见。
猜你喜欢
  • 2013-03-22
  • 2016-05-13
  • 1970-01-01
  • 2015-03-05
  • 1970-01-01
  • 2015-08-24
  • 2010-10-15
  • 1970-01-01
  • 2016-12-01
相关资源
最近更新 更多