git clone: Authentication failed for

前端 未结 12 1325
天命终不由人
天命终不由人 2020-12-25 09:57

Trying to access private corporate tfs. They gave me access by giving appropriate rights to windows user (domain\\login).

I\'m fine with accessing web interface of t

相关标签:
12条回答
  • 2020-12-25 10:09

    Rather than escape my password I left it out and was prompted for it, but only when I included the domain name before my username:

    git clone https://some-dom-name\firstname.lastname@tfs.somedomain.com/tfs/...
    
    0 讨论(0)
  • 2020-12-25 10:10

    In case someone is facing this issue with Azure DevOps, there the fix is very easy, just adding Git credentials to a repository.

    0 讨论(0)
  • I had the same issue when Cloning the repository via Bash/VS Code with "fatal:Authentication failed". I used SSH Key authentication instead to connect my repository following the article: [https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops&tabs=current-page][1] I didn't get any errors after with any bash commands!

    0 讨论(0)
  • 2020-12-25 10:17

    The culprit was russian account password.

    Accidentally set up it (wrong keyboard layout). Everything was working, so didnt bother changing it.

    Out of despair changed it now and it worked.

    If someone looked up this thread and its not a solution for you - check out comments under the question and steps i described in question, they might be useful to you.

    0 讨论(0)
  • 2020-12-25 10:20

    Adding username and password has worked for me: For e.g.

    https://myUserName:myPassWord@myGitRepositoryAddress/myAuthentificationName/myRepository.git
    
    0 讨论(0)
  • 2020-12-25 10:20

    After trying almost everything on this thread and others, continuing to Google, the only thing that worked for me, in the end, was to start Visual Studio as my AD user via command line:

    cd C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE
    runas /netonly /user:<comp\name.surname> devenv.exe
    

    Original issue: [1]: https://developercommunity.visualstudio.com/content/problem/304224/git-failed-with-a-fatal-errorauthentication-failed.html

    My situation is I'm on a personal machine connecting to a company's internal/local devops server (not cloud-based) that uses AD authorization. I had no issue with TFS, but with git could not get the clone to work (Git failed with a fatal error. Authentication failed for [url]) until I did that.

    0 讨论(0)
提交回复
热议问题