Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio needs credentials to access pkgs.dev.azure.com on mac

I am working on existing Xamarin project on mac which is on AzureDevOps. When I open that project in Visual studio for mac it prompting popup this

Image

However I logged in Visual Studio by credentials but when try with same credentials here its continuously pops out after hit OK button . and last it say restore package failed. Also I tried with Windows but its allow to restore all the packages without any hurdles after logged-in in VS2019. Any Suggestions....

like image 407
JohnWick Avatar asked Oct 18 '25 22:10

JohnWick


2 Answers

For me, it only worked, with the following credentials:

Username: username@domain

(e.g. if your email is: "[email protected]" -> use "peter.parker@spiderman")

Password: PAT-Key

The Personal Access Token (PAT) itself only needed Read-Rights for Packaging.

like image 179
RUL Avatar answered Oct 21 '25 11:10

RUL


I was having the same issue while using Visual Studio for Mac, i.e., "Visual Studio need credentials to access pkgs.de.azure.com" and it keep asking for username and password. Although I used the same credentials when I cloned the repository from Azure DevOps.

What I understand that my Personal Access Token (PAT) has Code (Read & Write) scope of access but not the Packaging (Read) access that is why, it was unable to restore packages.

I went to Personal Access Token settings, and added Packaging (Read) access to scope of access and then it worked perfectly. I hope it might be helpful for you :)

setting Packaging (Read) access for PAT in Azure DevOps

like image 28
Imtiaz Avatar answered Oct 21 '25 11:10

Imtiaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!