VS 2019 keeps asking for re-entering my credentials for Azure DevOps

Viewed 3010

Every time I log in I connect to DevOps through Visual Studio Pro 2019. It asks for entering the credentials. Is there a way to save them and connect them to the DevOps server directly?

4 Answers

It could possibly be the "Cryptographic network provider" and "Credential helper" in the "Git Global Settings". Check to see if they are Unset and if so set them to OpenSSL and GCM Core respectively.

enter image description here

I my case I had a Nuget source for a package inside Azure DevOps, ex:

https://pkgs.dev.azure.com/...

And the credentials were no longer working, showing this error in the output window:

{"$id":"1","innerException":null,"message":"User 'xxx-xxx-xxx-xxx-xxx' lacks permission to complete this action. You need to have 'ReadPackages'.","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedNeedsPermissionsException, Microsoft.VisualStudio.Services.Feed.WebApi",
            "typeKey":"FeedNeedsPermissionsException","errorCode":0,"eventId":3000}

My situation was similar to @gharel I had a private Nuget source in the NuGet.Config file that I didn't have credentials set for.

Added the credentials, restarted visual studio, and it worked fine

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <clear />
        <add key="{yourPrivateSource}" value="https://nuget.pkg.github.com/{yourPrivateSource}/index.json" />
    
    </packageSources>

    <packageSourceCredentials>
        <{yourPrivateSource}>
            <add key="Username" value="{yourUsername}" />
            <add key="ClearTextPassword" value="{yourPassword}" />
        </{yourPrivateSource}>      
    </packageSourceCredentials>
</configuration>

Use System web browser under Tools -> Options -> Environment -> Accounts

More info HERE

Related