Nuget Package Source Does Not Request Credentials

I have added a NuGet source. He needs credentials, but when I install the package using the packageName package of the install package, nothing happens. I tried the same steps on another PC and it works. I am using Visual Studio 2017 Professional. Can someone please help me with a problem? My NuGet Sources

+5
source share
2 answers

It is very strange that it does not request credentials.

To do this, I had to do the following :

  • Download nuget.exe from Nuget Download Site

  • Delete the old package source

    Go to NuGet Package Manager for solution-> Settings

enter image description here

Delete your Package Source 

enter image description here

  1. Run command line

    Go to nuget.exe

enter image description here

  1. Add a package source with a simple password in the command

    nuget.exe sources Add -Name " YourPackageName " -Source " YourPackageAddress " -Username YourUserName -password YourPassword strong> -StorePasswordInClearText

enter image description here

  1. Made ... phew
+4
source

After many attempts to set a password, a reset password, or something the only thing that helped me was to add this section to NuGet.Config (located in the .nuget folder for the main solution)

NuGet.Config

 <?xml version="1.0" encoding="utf-8"?> <configuration> <solution> <add key="disableSourceControlIntegration" value="false" /> </solution> <packageSourceCredentials> <MySourceName> <!-- Name of nuget package source --> <add key="Username" value="..." /> <add key="ClearTextPassword" value="..." /> <!-- This is for normal password--> <!--if encrypted use key="Password"--> </MySourceName> </packageSourceCredentials> </configuration> 

One important notice - for any changes to this file to take effect I had to restart VS

+2
source

Source: https://habr.com/ru/post/1271058/


All Articles