{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/6902","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/6902/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/6902/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/6902/events","html_url":"https://github.com/NuGet/Home/issues/6902","id":320348839,"node_id":"MDU6SXNzdWUzMjAzNDg4Mzk=","number":6902,"title":"Docker dotnet restore on VSTS fails to authenticate. ","user":{"login":"livarcocc","id":367554,"node_id":"MDQ6VXNlcjM2NzU1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/367554?v=4","gravatar_id":"","url":"https://api.github.com/users/livarcocc","html_url":"https://github.com/livarcocc","followers_url":"https://api.github.com/users/livarcocc/followers","following_url":"https://api.github.com/users/livarcocc/following{/other_user}","gists_url":"https://api.github.com/users/livarcocc/gists{/gist_id}","starred_url":"https://api.github.com/users/livarcocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livarcocc/subscriptions","organizations_url":"https://api.github.com/users/livarcocc/orgs","repos_url":"https://api.github.com/users/livarcocc/repos","events_url":"https://api.github.com/users/livarcocc/events{/privacy}","received_events_url":"https://api.github.com/users/livarcocc/received_events","type":"User","site_admin":false},"labels":[{"id":346004020,"node_id":"MDU6TGFiZWwzNDYwMDQwMjA=","url":"https://api.github.com/repos/NuGet/Home/labels/Area:%20Auth","name":"Area: Auth","color":"fef2c0","default":false},{"id":900985629,"node_id":"MDU6TGFiZWw5MDA5ODU2Mjk=","url":"https://api.github.com/repos/NuGet/Home/labels/Area:%20Docker","name":"Area: Docker","color":"a18eff","default":false},{"id":722811433,"node_id":"MDU6TGFiZWw3MjI4MTE0MzM=","url":"https://api.github.com/repos/NuGet/Home/labels/Area:%20Dotnet%20CLI","name":"Area: Dotnet CLI","color":"49b2c6","default":false},{"id":203358342,"node_id":"MDU6TGFiZWwyMDMzNTgzNDI=","url":"https://api.github.com/repos/NuGet/Home/labels/ClosedAs:External","name":"ClosedAs:External","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-04T16:57:09Z","updated_at":"2018-07-09T07:56:07Z","closed_at":null,"author_association":"NONE","body":"_From @SGStino on May 4, 2018 8:45_\n\n## Infrastructure:\r\n- vsts-agent running in docker\r\n- vsts agent running on windows machine\r\n- tfs 2018 on-premise \r\n\r\n## Steps to reproduce\r\n- Create a Nuget feed on the TFS server.\r\n- Create ASP.NET Core project, reference one nuget package from Internal feed\r\n- Build on Windows based agent\r\n- Build on Docker image\r\n\r\n## Expected  behavior\r\nBoth builds should succeed by using the OAuth token from VSTS?\r\n## Actual behavior\r\nDocker based build fails: 401 Unauthorized.\r\n```\r\nNuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://<tfsserver>/tfs/DefaultCollection/_packaging/<packagesource>/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).\r\nat System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()\r\nat NuGet.Protocol.HttpSource.<>c__DisplayClass12_0`1.<<GetAsync>b__0>d.MoveNext()\r\n```\r\n\r\nThe difference between the windows and the linux machine is that the windows machine runs as a service user that is known in TFS, and as such is authenticated via NTLM?\r\n\r\nAnd the linux container is outside of the domain, and as such, not authenticated\r\nHowever, specifying a PAT as \"Credentials for feeds outside this account/collection\" doesn't seem to help:\r\n\r\n![image](https://user-images.githubusercontent.com/5156315/39619429-1649a0d4-4f88-11e8-93f7-50fdd3a5a77e.png)\r\n\r\nI'm guessing this is becuase it is not \"Outside of this account/collection\" and as such doesn't use the credentials?\r\n\r\n## Environment data\r\n`dotnet --info` output: (official docker image)\r\n.NET Command Line Tools (2.1.101)\r\n\r\nProduct Information:\r\n Version:            2.1.101\r\n Commit SHA-1 hash:  6c22303bf0\r\n\r\nRuntime Environment:\r\n OS Name:     ubuntu\r\n OS Version:  16.04\r\n OS Platform: Linux\r\n RID:         ubuntu.16.04-x64\r\n Base Path:   /usr/share/dotnet/sdk/2.1.101/\r\n\r\nMicrosoft .NET Core Shared Framework Host\r\n\r\n  Version  : 2.0.6\r\n  Build    : 74b1c703813c8910df5b96f304b0f2b78cdf194d\r\n\r\n\r\n\r\n\r\n\n\n_Copied from original issue: dotnet/cli#9196_"},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/403392443","html_url":"https://github.com/NuGet/Home/issues/6902#issuecomment-403392443","issue_url":"https://api.github.com/repos/NuGet/Home/issues/6902","id":403392443,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzM5MjQ0Mw==","user":{"login":"SGStino","id":5156315,"node_id":"MDQ6VXNlcjUxNTYzMTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5156315?v=4","gravatar_id":"","url":"https://api.github.com/users/SGStino","html_url":"https://github.com/SGStino","followers_url":"https://api.github.com/users/SGStino/followers","following_url":"https://api.github.com/users/SGStino/following{/other_user}","gists_url":"https://api.github.com/users/SGStino/gists{/gist_id}","starred_url":"https://api.github.com/users/SGStino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SGStino/subscriptions","organizations_url":"https://api.github.com/users/SGStino/orgs","repos_url":"https://api.github.com/users/SGStino/repos","events_url":"https://api.github.com/users/SGStino/events{/privacy}","received_events_url":"https://api.github.com/users/SGStino/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T07:56:07Z","updated_at":"2018-07-09T07:56:07Z","author_association":"NONE","body":"Haven't gotten information from him yet aside that they'd look into it for the next release"}}
{"actor":{"display_login":"SGStino"}}