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
and when prompted for a password in VSCode
entered the new PAT in, but still get
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
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.
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.
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.Please also make sure your user account is on or above the Basic access level and NOT a Stakeholder.