-
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
Visual Studio not using packageCredentials from NuGetDefaults.config #4953
Comments
@alpaix Can this be fixed in the next VS2017 update? The prompt window is driving us crazy.. |
@yishaigalatzer @dnfclas @emgarten |
VS 2015+2017, nuget.exe v4 and dotnet.exe certainly have this issue. |
@alpaix @emgarten @dnfclas @joelverhagen Anyone? |
@ygeelen-tb Thanks for reporting this issue. It's been added to our backlog. We'll consider resolving it in upcoming releases. |
@ygeelen-tb are you still able to repro this in the latest NuGet 4.4? If so would it be possible for you to help track down why these config files are not coming through? |
@emgarten Sure, I will do another test at home asap and keep you posted. |
@emgarten The first time I tried to access a feed I had to enter the credentials at the command line. All next attempts I didn't have to enter them ("using credentials from config" is printed at command line). But even when commenting out the config, it kept working. When testing using my local machine name in the Feed URL instead of localhost, I need to enter my credentials each time again? "using credentials from config" is not printed at command line. Is NuGet.exe 4.4 being shipped with the latest version of Visual Studio already? |
Visual Studio 15.4 contains NuGet 4.4.0 Just to clarify, nuget.exe has never shipped as part of VS. |
Has this been resolved? |
No, still not. |
@emgarten Any news on this? It's been a plague for us for years now. As mentioned by @alpaix in #4938 : |
I'll take a look. |
Adding credentials to any other nuget.config file apart from nugetdefaults.config works fine for me and successfully reads the feed. ❌ This path does not support credentials: ✔️ To store credentials under program files put your nuget.config under: I have verified that this is the same behavior as NuGet 2.8.6. This is not a regression for NuGetDefaults.config. Also after going through the docs I do not see any mention of support for credentials so I don't believe this has ever been expected to work. |
Visual Studio UI, Package Manager Console, NuGet.exe and dotnet.exe should not rely on the browser cache for Basic HTTP credentials when packageCredentials are configured in NuGetDefaults.config, they should be read from NuGetDefaults.config for each request/query instead.
We have configured multiple private nuget feeds using ProGet, which have the same hostname but different credentials for each URI.
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="TestFeed" value="http://mycompany.com/nuget/feed1" /> <add key="ReleaseFeed" value="http://mycompany.com/nuget/feed2" /> </packageSources> <packageSourceCredentials> <TestFeed> <add key="Username" value="user1" /> <add key="ClearTextPassword" value="..." /> </TestFeed> <ReleaseFeed> <add key="Username" value="user2" /> <add key="ClearTextPassword" value="..." /> </ReleaseFeed> </packageSourceCredentials> </configuration>
Visual Studio 2015 and now also Visual Studio 2017 tend to prompt for credentials in a dialog window often. I think this happens when you have not saved the credentials using your default browser for the domain of the feeds. (The feeds have a web interface with a login page.)
See also #4938
The text was updated successfully, but these errors were encountered: