-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET SDK 2.1.500 Auth problem with NuGet Source with space in its name (401 Unauthorized during build restore step) #7527
Comments
We have the same issue. I was running dotnet restore with version 2.1.402 and it was working fine. After installing dotnet core 2.1.500 dotnet restore started giving 401 errors on our private nuget feed (JFrog Artifactory) that requires authentication. After adding a global.json to the folder that specified the previous version, the nuget packages could be restored successfully again. |
Do you know if your build tasks are using configs or the credential provider? Potentially related to #7524 |
The feed credentials are stored in Nuget.config, if that is not what you mean, then please tell me what to check. Never heard of the credential provider before. I'm running dotnet restore from the command line. |
@jmeijrink In 2.1.400 of the SDK, NuGet support for a cross platform credential provider. Have either of you reproduced this issue locally? Also is it consistently reproduce on your CI and on all build agents? We have had similar reports but we haven't been able to get a consistent repro on our end. |
We think it could be related to |
@jmeijrink @Allann |
Yes, and I can confirm that removing the space solved the issue for me. |
locally works fine, the build server fails constantly. I will double check in the morning but since the step uses the feed in the combo box as shown in the image above, I don't think a space is included. Not sure what the step does internally. |
The temporary generated NuGet.config in c:\build\Agent_work\1\NuGet\tempNuGet_1074.config contains the packageSources and the packageSourceCredential like this:
The first character of the GUID "7" has been changed to "x0037" . So i think NuGet can't get the correct packageSourceCredentials and thus can not autorize to the NuGet server. I have copied the temporary NuGet.config file to c:\Users<username>.nuget\NuGet.Config and changed the content to this and the build works!
|
Thanks all for you help in diagnosing this. Please track #7517 for when that happens. |
From @Allann on November 20, 2018 1:46
I raised this issue in the community forum https://developercommunity.visualstudio.com/content/problem/386555/401-unauthorized-1.html but might have been the wrong place. Delete this if not required.
Steps to reproduce
Install SDK 2.1.500 on build machine (or use the .Net Core Tools Installer step)
Queue a build
Fails the restore step
Expected behavior
Successful build
Actual behavior
Receive the following build error:
Environment data
dotnet --info
output:I confirmed the SDK was the cause by removing it via the Add Remove Programs and reverting back to 2.1.403. Successfully builds using 2.1.403. Created a brand new Windows 10 machine, only added 2.1.403 and then installed the latest agent. Ran a build, success, changed the tool installer step to use 2.1.500, and the same build failed. Changing back to 403 again passed.
Copied from original issue: dotnet/cli#10365
The text was updated successfully, but these errors were encountered: