git clone: Authentication failed for

前端 未结 12 1329
天命终不由人
天命终不由人 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:26

    I'm facing exactly same error when I'm trying to clone a repository on a brand new machine. I'm using Git bash as my Git client. When I ran Git's command to clone a repository it was not prompting me for user id and password which will be used for authentication. It was a fresh machine where not a single credential was cached by Windows credential manager.

    As a last resort, I manually added my credentials in credentials manager.

    Go to > Control Panel\User Accounts\Credential Manager > Windows Credentials

    Click Add a Windows credential link and then Supply the details as shown in the form below and you're done:

    I had put the details as below:

    Internet or network address: 
    User Name: MyCompanysDomainName\MyUserName
    Password: MyPassword
    

    Next time you run any Git command targeting a repository set up on above address this manually created credential will be used.

    Is also important if you have a git command line you close it and reopen it for changes to be applied.

    Sharing my experience here in case it helps someone in future.

提交回复
热议问题