How can I authenticate to our TFS server in my Git

2019-02-20 14:37发布

We have a TFS 2017 server setup on our corporate domain. I want to use the Git for Windows CMD line to push and pull code from a repo on that TFS server.

I have added the neccessary certs to my local store in order to pass the SSL hurdle, but now when I try and clone the remote repo down into either my domain joined workstation OR my non-domain laptop, I get the following error:

fatal: Authentication failed for 'https://TFSServer/Collection/ABC/_git/Alarm/

Why doesn't Git prompt me for my credentials?

标签: git ssl tfs
2条回答
Rolldiameter
2楼-- · 2019-02-20 15:20

First suggest you Use Git Credential Managers to Authenticate to Visual Studio Team Services

When you connect to a TFS Git repository from your Git client for the first time, the credential manager will prompt for your credentials.

Another option is using SSH key authentication

Connect to your Git repos through SSH when you can't use the recommended Git Credential Managers or Personal Access Tokens to securely connect using HTTPS authentication.

查看更多
劳资没心,怎么记你
3楼-- · 2019-02-20 15:21

Make sure you don't have a credential helper which might have cached the wrong credentials.

Check git config -l for any credential.helper line.

With recent Git for Windows, you would be using the Microsoft Git Credential Manager, linked to the Credential Manager in Windows

查看更多
登录 后发表回答