question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dotnet restore fails behind corporate proxy

See original GitHub issue

Steps to reproduce

Create new Dockerfile as follows:

FROM microsoft/dotnet

ENV http_proxy http://user:login@host:port
ENV https_proxy http://user:login@host:port

COPY ./Proxy_CA.crt /usr/local/share/ca-certificates/Proxy_CA.crt
RUN ["sudo", "update-ca-certificates"]
CMD ["bash"]

Then build new image:

sudo docker build -t dotnet-cmd .

Actual behavior

Run a new container:

sudo docker run -it dotnet-cmd

Then, inside container:

root@b268392801e3:/# mkdir temp
root@b268392801e3:/# cd temp
root@b268392801e3:/temp# dotnet new
Created new C# project in /temp.
root@b268392801e3:/temp# dotnet restore
log  : Restoring packages for /temp/project.json...
error: The reason phrase must not contain new-line characters.

while normal curl works:

root@b268392801e3:/temp# curl https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
{"version":"3.0.0-beta.1", ...
root@b268392801e3:/temp# curl https://api.nuget.org/v3/index.json                     
{
  "version": "3.0.0-beta.1", ...

Full verbose output from dotnet restore:

root@b268392801e3:/temp# dotnet restore -v debug
trace: Running restore with 2 concurrent jobs.
trace: Reading project file /temp/project.json.
trace: Loaded project temp from /temp/project.json.
trace: Found project root directory: /temp.
trace: Using packages directory: /root/.nuget/packages/.
log  : Restoring packages for /temp/project.json...
trace: Restoring packages for DNXCore,Version=v5.0...
error: The reason phrase must not contain new-line characters.
trace: System.AggregateException: One or more errors occurred. (The reason phrase must not contain new-line characters.) ---> System.FormatException: The reason phrase must not contain new-line characters.
trace:    at System.Net.Http.HttpResponseMessage.set_ReasonPhrase(String value)
trace:    at System.Net.Http.CurlResponseParseUtils.ReadStatusLine(HttpResponseMessage response, String responseHeader)
trace:    at System.Net.Http.CurlHandler.TryParseStatusLine(HttpResponseMessage response, String responseHeader, EasyRequest state)
trace:    at System.Net.Http.CurlHandler.MultiAgent.CurlReceiveHeadersCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context)
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()
trace:    --- End of inner exception stack trace ---
trace:    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
trace:    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
trace:    at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
trace:    at NuGet.CommandLine.XPlat.Program.Main(String[] args)
trace: ---> (Inner Exception #0) System.FormatException: The reason phrase must not contain new-line characters.
trace:    at System.Net.Http.HttpResponseMessage.set_ReasonPhrase(String value)
trace:    at System.Net.Http.CurlResponseParseUtils.ReadStatusLine(HttpResponseMessage response, String responseHeader)
trace:    at System.Net.Http.CurlHandler.TryParseStatusLine(HttpResponseMessage response, String responseHeader, EasyRequest state)
trace:    at System.Net.Http.CurlHandler.MultiAgent.CurlReceiveHeadersCallback(IntPtr buffer, UInt64 size, UInt64 nitems, IntPtr context)
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpRetryHandler.<SendAsync>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<SendWithCredentialSupportAsync>d__25.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetThrottled>d__20.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.HttpSource.<GetAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<GetIndexJson>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.ServiceIndexResourceV3Provider.<TryCreate>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.v3.RemoteRepositories.HttpFileSystemBasedFindPackageByIdResourceProvider.<TryCreate>d__2.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__11`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Protocol.Core.Types.SourceRepository.<GetResourceAsync>d__10`1.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<EnsureResource>d__13.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.SourceRepositoryDependencyProvider.<FindLibraryAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<>c__DisplayClass15_1.<<FindLibrary>b__0>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibrary>d__15.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryByVersion>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryMatch>d__11.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<FindLibraryEntry>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.DependencyResolver.RemoteDependencyWalker.<CreateGraphNode>d__3.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<WalkDependenciesAsync>d__18.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<TryRestore>d__9.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteRestoreAsync>d__8.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.Commands.RestoreCommand.<ExecuteAsync>d__7.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<ExecuteRestoreAsync>d__14.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_2.<<Main>b__4>d.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<CompleteTaskAsync>d__10.MoveNext()
trace: --- End of stack trace from previous location where exception was thrown ---
trace:    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
trace:    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
trace:    at NuGet.CommandLine.XPlat.Program.<>c__DisplayClass7_1.<<Main>b__3>d.MoveNext()<---

Note: without configuring Proxy_CA.crt curl is failing with the following error so I believe dotnet is somehow ignoring it, while curl does not:

root@4c12f5a8da73:/test# curl https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Note: our proxy is using Active Directory credentianls, provided by the user:login in the proxy settings.

Environment data

dotnet --info output:

root@b268392801e3:/temp# dotnet --version
.NET Command Line Tools (1.0.0-beta-001598)

Product Information:
 Version:     1.0.0-beta-001598
 Commit Sha:  N/A

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 Runtime Id:  ubuntu.14.04-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
carlosrfernandezcommented, Apr 4, 2016

Same here… Right now it’s a blocking issue for us. I hope it’s fixed soon. I might be wrong, but I think this is actually related to the Nuget XPLAT console client. (which is what dotnet restore calls)

0reactions
TheRealPiotrPcommented, Nov 10, 2016

Looks like this got fixed. If anyone is still experiencing this issue please reopen with details at https://github.com/nuget/home

Read more comments on GitHub >

github_iconTop Results From Across the Web

net core - dotnet restore fails using corporate proxy
I just upgraded to dotnet core 2.1, but dotnet restore is failing. For some reason it is not using the http_proxy or https_proxy...
Read more >
dotnet restore, with HTTP_PROXY and HTTPS_PROXY ...
set HTTP_PROXY=http://user:password@your-proxy:port $> set ... All internal feed nugets are OK and restored; dotnet still fails behind proxy.
Read more >
Dotnet restore fails using corporate proxy
I just upgraded to dotnet core 2.1, but dotnet restore is failing. For some reason it is not using the http_proxy or https_proxy...
Read more >
Proxy issue on Nuget Restore task
I'm stuck on the following message within the Nuget Restore Task of ... Net.Http.HttpRequestException: An error occurred while sending the ...
Read more >
Running dotnet restore for command line in a proxy server ...
Run dotnet restore and see what info you're getting. nuget config -set http_proxy. password="Your secret password."
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found