【问题标题】:Proxy interfering with Azure Server/ NuGet Push Error404代理干扰 Azure 服务器/NuGet 推送 Error404
【发布时间】:2020-02-13 10:46:48
【问题描述】:

我尝试将 nupkg 推送到 Azure DevOps 服务器中的工件,但失败并出现以下错误:

---> (Inner Exception #0) NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://<DomainName>/nuget/v3/index.json ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).

我怀疑问题可能是公司的代理干扰了 Azure DevOps Server。

代理的配置如下:

 <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <config>
        <add key="http_proxy" value="http://ep.threatpulse.net:80" />
  </config>
</configuration>

另外,我尝试配置代理设置,但仍然无效。

有人知道可能出了什么问题或者我该如何解决这个问题吗?

版本 Dev17.M153.5

【问题讨论】:

  • 只是检查提供的信息是否有用。如果您需要进一步的帮助,请告诉我们。
  • 我尝试了您给我的解决方案,但没有奏效。我正在等着看IT办公室是否可以解决它。同时我正在检查你给我的线程。谢谢你的帮助。

标签: azure proxy azure-devops nuget azure-pipelines


【解决方案1】:

代理干扰 Azure 服务器/NuGet Push Error404

是的,这个错误确实是代理引起的,你做的也是正确的。

只需确保您已将代理设置添加到位于以下路径的Nuget.Config 文件中:

%appdata%\NuGet\NuGet.config

NuGet.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <config>
        <add key="http_proxy" value="http://ep.threatpulse.net:80" />
        <add key="https_proxy" value="http://ep.threatpulse.net:80" />
    </config>

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

</configuration> 

您可以查看this thread 了解更多详情。

如果还是不行,建议你联系你的办公室 IT 确认代理设置。

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-18
    • 1970-01-01
    • 2012-10-05
    • 1970-01-01
    • 2022-10-21
    • 2010-11-03
    • 1970-01-01
    相关资源
    最近更新 更多