-
Notifications
You must be signed in to change notification settings - Fork 258
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
CredentialProvider in MSBuild Nuget Restore? #6609
Comments
Thanks for creating this issue. Currently the only alternative is storing your credentials in the NuGet.Config. |
Thanks @nkolev92 - so should we just use |
@Tadimsky By the above, I meant the only alternative for msbuild :) |
In our build we end up doing running When it tries to restore the packages from the Azure feed we get a bunch of 401s:
To make sure I was indeed auth'ed I ran CredProvider in standalone
dotnet cli version is: 3.0.100-preview5-011568 /fyi: @markwilkie |
@jcagme |
I would totally expect this to work. It makes the developer workflow much worse as it is, since now you need to know that depending on what's in a repository's I'd just love to be able to tell users they just need to:
(2. would do restore, then build then maybe even test) Done |
Are you referring to the original ask or @jcagme's comment? The original scenario now works. The CI scenario is different. No prompts/blocks are allowed, so the credential provider provide configurations to allow the skipping of the interactive step. |
Hm... we recently had to add a |
Details about Problem
I have a project that has Nuget dependencies that are in our private feeds in VSTS. We have an issue where running Nuget restore via
msbuild
from the command line results in a 401 failure as it does not have credentials to access the feed.We've been using this guide: https://docs.microsoft.com/en-us/vsts/package/nuget/bootstrap-nuget but this seems to only work if running nuget.exe and not Nuget as part of MSBuild.
Is there something we need to do for this to work correctly?
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): msbuild.exe on command line.
VS version (if appropriate): 15.5.7
OS version (i.e. win10 v1607 (14393.321)): 17107.1000
Detailed repro steps so we can see the same problem
Run msbuild /t:Restore on a project that has Nuget dependencies with a feed that requires authentication
Nuget invoked via MSBuild does not use the CredentialProvider that nuget.exe would normally use.
...
Other suggested things
Verbose Logs
The text was updated successfully, but these errors were encountered: