skip to Main Content

I found out that my PAT wasn’t working when I tried to push to remote and got an ‘Authentication failed’ message. So I generated a new PAT
enter image description here

and when prompted for a password in VSCode
enter image description here

entered the new PAT in, but still get
enter image description here

I’ve tried logging in and out of Azure Devops (no problemo) and for now, have resorted to directly making changes in the master branch using the Azure Devops UI which is absolutely bonkers.

Any suggestions on how I could solve this?

2

Answers


  1. Chosen as BEST ANSWER

    It worked when I deleted my token (which had the same name as the one that had expired) and created a new one with a new, unique name. I wonder if it's a bug, but now, it's working.


  2. From the I screenshot that you shared, it seemed that the PAT against which you authenticated to push commits to Azure Repos, lacked the required authorization scope of Code (Read & write). Please create a new PAT following the marks in the image below.

    Image

    We can also try and run git clone <repo_url> command to generate a valid PAT to read and write the code in the cloud repo. This operation will create a new PAT for us as well.

    Image

    Please also make sure your user account is on or above the Basic access level and NOT a Stakeholder.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search