0

I was granted access as a Contributor within Azure DevOps to a remote repository that I have been submitting changes to for the past twelve months. Suddenly and without warning I am no longer able to push changes. The following error message is provided via the Visual Studio 2019 Output window:

Error encountered while pushing to the remote repository: Git failed with a fatal error. Authentication failed for 'https://dev.azure.com/[domain]/[app]/_git/[repo]/' Pushing to https://dev.azure.com/[domain]/[app]/_git/[repo]

Unfortunately, none of the principals responsible for originally setting up the Azure DevOps project remain with the Company and a new Project Administrator has stepped in. It seems like it should be a straight-forward process to restore or renew expired access to a project Contributor (such as myself); however, we have spent nearly two weeks and I am still unable to push changes. The Project Administrator is new to Azure DevOps and I am new to Visual Studio 2019 Git; hence, our dilemma.

What steps need to be taken, whether in Azure DevOps, Visual Studio 2019 Git or both in order restore my access to this project?

As an aside, I have posted a similar issue on GitHub but have yet to receive a reply. Any assistance is greatly appreciated.

rpowell6
  • 183
  • 2
  • 13

3 Answers3

2

My issue was resolved by: (a) renewing expired personal access tokens inside Azure DevOps; and (b) pointing Visual Studio 2019 to a newer version of the Git Credentials Manager for Windows. The following article provided clarity with respect to the particular error message I was receiving and provided detailed instructions for redirecting VS 2019 to the newer GCMW version:

https://jessehouwing.net/configure-visual-studio-to-use-a-different-git-credential-manager-for-windows/

rpowell6
  • 183
  • 2
  • 13
0

It would help if you listed off the things you've tried. Absent that, here are some steps you could take:

  • Are you able to push to the repo using Git on the command line? This would narrow the scope of the problem to either VS 2019 or ADO permissions / credentials.

  • Are you able to pull or fetch from the repo using Git on the command line or in VS 2019? This may narrow the scope to a specific permission in ADO.

  • Have you tried cloning the repo to a new folder locally? Are you able to pull and push from there?

  • In the settings for this specific repository, have you tried toggling off Inheritance? You could also click the button to Download detailed report. You'll get an email with a link to download a JSON file that you could comb through to isolate a permission problem.

Permissions in ADO are kind of scattered all over the place. For repos, you need to go to Project settings (lower left corner with gear icon). From there, to Repositories. You'll then be able to view and/or modify Security settings for All Repositories, or a specific repository.

Note that permissions are inherited and determined based on the user's individual permissions and the permissions of the groups to which the user belongs. Check to see if any of those are set to Deny. It can be a bit tricky, and pretty easy to get hosed up if you don't understand how it all works. I suggest reading up on it a bit. Here are some helpful links:

https://learn.microsoft.com/en-us/azure/devops/organizations/security/about-permissions?view=azure-devops&tabs=preview-page

https://learn.microsoft.com/en-us/azure/devops/repos/git/set-git-repository-permissions?view=azure-devops

https://learn.microsoft.com/en-us/azure/devops/organizations/security/restrict-access?view=azure-devops

https://learn.microsoft.com/en-us/azure/devops/organizations/security/permissions-access?view=azure-devops

Kyle K
  • 163
  • 1
  • 8
0

I also faced this issue. This is what worked for me.

  1. Navigate to windows credentials: Control panel (cpl)-> user accounts -> Windows credentials-> Generic credentials Screenshot of Windows credentials

  2. Locate the url you have issues cloning (under Generic credentials), it will be prefixed with git: and remove that entry and close the control panel. Screenshot of Remove entry

  3. Close Visual Studio (if open) and reopen and try to clone now, Visual studio will prompt for credentials.

I hope that helps. :)

Gul B
  • 21
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 18 '22 at 06:37