fatal: Authentication failed

Make sure your git credential helper is declared to your local Git:

git config credential.helper

If the output is empty, type:

git config --global credential.helper manager

Then try again.

However, the OP AskYous correctly pinpoint another issue in the comment:

Can I tell it what my username is?
I think my username is my email address, because I use my organization account to sign in.

In that case, the URL would be:

https://me%[email protected]/yousefshanawany/<repo-name>/

Note the @ of the email must be percent-encoded.


Note that using a PAT (Personal Access Token) is an alternative mentioned by the OP, and mandatory if you have 2FA activated.


Update June 2019: This question was referenced in microsoft/Git-Credential-Manager-for-Mac-and-Linux issue 104, which just got closed with a comment from John Briggs from Microsoft:

I'd recommend trying GCM Core's macOS preview release


Maksym Pecheniuk points out in the comments:

solution for IntelliJ Idea: "Git IntelliJ "Authentication Failed”"


What solved my issue was:

  1. Create the repository from https://dev.azure.com/

  2. From the repository view, create your credentials with name and password enter image description here

  3. Now in the console you can clone your repository by changing the url that azure provides you initialy as

git clone https://<companyname>@dev.azure.com/<companyname>/<project name>/_git/<repository name>

to

git clone https://<your credentials name>@dev.azure.com/<companyname>/<project name/_git/<repository name>

now it will ask you for a password. You must use the one you provided when you created the credentials.


A solution I found is to use a personal access token (PAT). It's located in the "clone" tab. It worked very easily.