tfsazure-devopsnuget

nuget credentials how to tell which provider is being used?


So for "security" reasons I am forced to use a different account to run visual studio for certain admin level operations (registering COM objects mostly). TFS however only knows about my lower level regular account. In the past this hasn't been an issue and I've set credentials up for my admin account to log into TFS with the regular account.

However something has changed since I last did a password change and logging into one particular nuget feed (hosted by TFS / Azure devops server in house) from VS2019 running as admin will lock my AD account. Also my git TFS account seems not to be using the correct account. A different feed hosted by the same TFS instance (the only difference is the feed name) works fine.

I have tried setting credentials for nuget using dotnet nuget update source name -u username -p password and that hasn't helped. I suspect since git gives issues when I push to the TFS server it's using some sort of windows stored user name and password and nuget is using the same invalid credentials. I can login to TFS to search for work items in VS2019 to add on git commits so at least one provider is set correctly.

So my question is how do I find out what the actual username and credential type / provider is being used for a particular nuget feed? Ideally I'd like to find out what username it's using as well.


Solution

  • Please first make sure the account you were logging in with does have permission to the nuget package.

    how do I find out what the actual username and credential type / provider is being used for a particular nuget feed?

    You should find CredentialProvider in my local folder:

    C:\Users\[username]\AppData\Local\NuGet\CredentialProviders\

    Use NuGet with Azure DevOps Services feeds

    Also give a try with below solution, check if this do the trick:

    1. Right click on your solution from Solution Explorer
    2. Manage Nuget Packages for Solution-> on top right corner click on the gear symbol -> on the left hand-side go to NuGet Package Manager
    3. Package Sources -> on right hand-side UNCHECKED the package source you are having trouble with
    4. Click Ok button -> restart your VS it should only ask you login once now