Reputation: 10390
I have always created local repositories using this command:
git clone http://TFSServer:8080/tfs/Scripts/_git/ProjectName
However, when I do it at the moment I get this message:
Cloning into 'ProjectName' ...
fatal: Authentication failed for 'http://TFSServer:8080/tfs/Scripts/_git/ProjectName/'
When starting up Visual Studio Code I see this error:
unable to get local issuer certificate
and when trying to push to TFS from VSCode (which I have always been able to do in the past), I see this error:
Authentication failed on the git remote
After checking the repo permissions, I can see that I have full permissions:
Upvotes: 13
Views: 20798
Reputation: 1714
In my case the issue was resolved changing settings in Visual Studio. I got the instructions from this post on Microsoft's Developer Community.
Git Clone from TFS: Authentication error
Depending on what kind of secure channel are you using to connect to your repo the solution for this issue could be different. In my case I'm using OpenSSL and the steps to fix the problem are ase follows:
Upvotes: 0
Reputation: 10390
It turns out that this only started happening after I needed to change Windows logon password.
The password was updated locally and on the TFS server, but not in the cached credentials for git.
Control Panel
-> Credential Manager
-> Generic Credentials
Then update the password for git:http://ServerName:1234/
Now I can successfully access the repo from command line and VS Code.
Upvotes: 46
Reputation: 31023
Please check the Git repository 'ProjectName' permissions to see whether you have the Read permission, or grant your account the Read permssion:
Upvotes: 2
Reputation: 59020
I can almost guarantee you that the URL you're using is wrong.
It should typically be:
git clone http://<tfs uri>/tfs/<team project collection name>/<team project name>/_git/<repo name>
Upvotes: -1