Reputation: 233
Using: Windows 10, Github Desktop, Git 2.19.1.windows.1(64bit), VisualStudio VSTS
Background: Managed to add the repository I had in my machine, but I can't do anything with it. I have access to the remote repository, I used gittortoise before, and I could commit just fine.
Procedure: Trying to use Github desktop to fetch, pull, or commit changes to remote.
Error: Authentication Failed (We were unable to authenticate with repository. Please enter your username and password to try again.)
Attempt: Tried to input the username and password I used to login visual studio vsts, it keeps giving me the same error.
Objective: Fetch, pull, commit from github desktop to remote repository.
Upvotes: 23
Views: 31037
Reputation: 18734
There is one more caveat to be aware of. It's important to use the correct address of the repository. It needs to have the following format:
https://<organization>@dev.azure.com/<organization>/<project_name>/_git/<repository_name>
as pointed on Authenticating to Azure DevOps with GitHub Desktop.
Note that the link specifies <username>
inplace of the <organization>
however this did not work for me and also the properties of a repository use the organization there.
Upvotes: 0
Reputation: 42
After searching for many answers which did not work I stumbled on a https://github.com/desktop/desktop/issues/7454
This was the solution that worked for me.
Some users have reported modifying the command processor's AutoRun setting (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\Autorun) has caused these authentication issues.
After removing my Autorun, I no longer had issues.
Upvotes: 0
Reputation: 41
I was also facing the same error today. I cross-checked and found that I have already added remote origin by
git remote add origin "url"
So basically removing remote origin or remote destination solved my issue.
git remote rm origin
git remote rm destination
Post that I tried pushing with github desktop, and it worked.
Upvotes: 1
Reputation: 466
Actually, the guy above, @bhoeschen, is spot on.
Instead entering your VSTS / Azure DevOPS username and password, rather create a Personal Access Token (PAT), and use that for the password.
Condensed instructions from that page:
Upvotes: 40