visual-studio - Visual Studio 2015 中的包管理器 "407 (Proxy Authentication Required)"

标签 visual-studio visual-studio-2015 nuget package-managers nugetgallery

我知道这是一个经常被问到的问题,但是经过几天的研究,我还没有找到这个特定问题的答案。

我有一个新的 ASP.NET 5 (Core 1.0) MVC 模板,我试图添加一个包,但是每次我进入包管理器输出时:

Response status code does not indicate success: 407 (Proxy Authentication Required). 

以及解决方案资源管理器顶部的以下内容:

enter image description here

我的设置看起来不错,我可以在“管理解决方案包”屏幕中浏览包。

我知道我被要求提供凭据,那么我在哪里输入它们?另一方面,我机器上的所有其他应用程序都已验证互联网访问权限,那我为什么要这样做呢?

任何想法/指针都非常受欢迎。

Visual Studio 2015 - 14.0.24720.00 更新 1
适用于 Visual Studio 2015 的 NuGet 包管理器 - 3.3.0.167

包管理器输出的顶部:

安装 NuGet 包 AutoMapper.4.2.1。
成功将“AutoMapper 4.2.1”安装到 CustomerPortal
==========完成==========
PATH=.\node_modules.bin;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\medmondson.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe "C:\Users\medmondson.dnx\runtimes\dnx-clr-win- x86.1.0.0-rc1-update1\bin\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll"恢复 "M:\visual studio 2015\Projects\CustomerPortal\src\CustomerPortal"-f "C:\Program 文件 (x86)\Microsoft Web 工具\DNU"
Microsoft .NET 开发实用程序 Clr-x86-1.0.0-rc1-16231
获取 https://www.nuget.org/api/v2/
获取 http://packages.nuget.org/v1/FeedService.svc/
获取 https://www.postsharp.net/nuget/packages/
恢复 M:\visual studio 2015\Projects\CustomerPortal\src\CustomerPortal\project.json 的包
获取 https://www.nuget.org/api/v2/FindPackagesById()?id= '自动映射器'
获取 http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id= '自动映射器'
获取 https://www.postsharp.net/nuget/packages/FindPackagesById()?id= '自动映射器'
警告:FindPackagesById:AutoMapper
发送请求时出错。
获取 https://www.nuget.org/api/v2/FindPackagesById()?id= '自动映射器'
获取 https://www.nuget.org/api/v2/FindPackagesById()?id= 'System.Collections.Immutable'
获取 http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id= 'System.Collections.Immutable'
获取 https://www.postsharp.net/nuget/packages/FindPackagesById()?id= 'System.Collections.Immutable'
警告:FindPackagesById:AutoMapper
发送请求时出错。
获取 https://www.postsharp.net/nuget/packages/FindPackagesById()?id= '自动映射器'
警告:FindPackagesById:AutoMapper
响应状态码不表示成功:407(需要代理验证)。

更新

我设法捕获了一个非工作请求(返回 407)和一个使用 的工作请求。唯一的区别是 Proxy-Authorization header 的内容 哪个更长。这表明代理身份验证确实存在,但它使用不同的协议(protocol)。

最佳答案

  • 更新到最新的 nuget.exe 1st
    nuget update self
    
  • 在配置文件中添加了代理详细信息:
    nuget config -Set http_proxy=http://username:password@proxyserver.company.com:port
    
  • 关于visual-studio - Visual Studio 2015 中的包管理器 "407 (Proxy Authentication Required)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36310915/

    相关文章:

    c# - C#中的YouTube视频播放器

    c# - Visual Studio 2015 .NETCore 类库复制文件夹到 bin/Debug/net452

    powershell - 从包管理控制台构建项目

    visual-studio - installshield中的安装服务

    .net - 与多个项目和开发人员签署程序集的最佳实践

    python - Visual Studio 2015 中的 TensorFlow,使用 Canopy 作为 Python 环境

    asp.net - NUget软件包管理器更改目录

    c# - NuGet 依赖策略

    c# - Visual Studio 停止,进入 Debug模式,但我不知道它暂停在哪一行

    visual-studio - 在 Visual Studio 中创建新类时,如何将其默认为 public?