Why does Nuget enter a loop when asking for credentials?

Why does Nuget enter a loop when asking for credentials?

AuthorFullName__c
JFrog Support
articleNumber
000001343
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:38:15Z
lastModifiedDate
2023-02-26T15:05:26Z
VersionNumber
3

Nuget enters a loop when you are not providing the “-Source <source name>” while trying to install the package.

Try adding this to the command and see if it is working: 

 

“Nuget.exe install <package name> -Source <source name>”.

 

If this is not successful, open your NuGet.config file located in the following location  “C:\Users\<your user name>\AppData\Roaming\NuGet”.

 

Please remove all the configuration in the file that will look like this:

 

 

<?xml version="1.0" encoding="utf-8"?>

<configuration>

 

  <apikeys>

  </apikeys>

  <packageSources>

  </packageSources>

</configuration>

 

 

Save the file with no configurations in it and add the new source.

 

“nuget sources Add -Name <source name of your choice> -Source <url to the repo>”

 

 

You can find the command in our wiki page “Publishing to a Local Repository”.

 

After adding the source we will need to provide the credentials also:

 

“nuget setapikey <username>:<password> -Source <source name from the previous command>”.

 

 

To push or install a package you need to use the following command:

 

“nuget install <package name> -Source <source name from previous command>”.