Can not restore nuget package from private Azure Artifact on mac OS

Viewed 791

Everything works well on windows:

  1. Publish nuget packages to my private Azure Artifact
  2. Log in my account into Visual Studio 2019
  3. Config my private feed in my project
  4. Restore my project
  5. It automatically authenticates my account since I already logged in in step 2

But when I using mac OS(visual studio 2019): I always failed at step 5 with error: 401 Unauthorized

Is there any command to check the current status of my account or login into Visual?

Note: My Microsoft account using 2FA

2 Answers

Had the same problem and fixed it with OP's solution. Here are the steps I took:

  • Create PAT in Azure Devops.
  • Open solution that uses a private nuget.
  • Restore nugets and get prompted login and password.
  • Use Devops-account email as username and PAT as password.

Resolved my problem. I don't know why my DevOps Account doesn't have permission to restore the package(MAC OS only). Then, I go to Azure DevOps, generate a token which includes Access Artifact privilege. Then I update that token into Visual Studio for MAC, then It works

Related