I want to use the git command line tools with the Microsoft Team Foundation Server Git repositories.
But every time I want to access to remote repos the authentication fails. And of course I am using Active Directory (this is a TFS server). The git repo management works perfectly from Visual Studio. (even push, sync, clone, etc).
Cloning into 'blabla'
fatal: Authentication failed for 'http://server:8080/tfs/BlaCollection/_git/blabla/'
I have intented using this patters and always fail.
- DOMAIN\username
- username@domainforest
Anyone has get connected using command line tools to a TFS with git server? In my company we use tokens to log on Windows, may be the reason?
My solution
Open Control Panel > Credential Manager > Windows Credentials.
Under Generic Credentials -> Add a generic credential
Inter network address: git:https://tfs.[google].com
admin:
password:
Replace google with the domain of your company. Put your EID or credentials to log into TFS.
Try to use the Authentication
--username
and--password
parameters with the command directly such as:No matter, how your company use to log on windows, you just need the account which login in the TFS. You can find the account info in
Windows-Control Panel- Credential Manager
Visual Studio store credentials in the Windows Credential Manager, which is compatible with the Git Credential Winstore. If you install Git Credential Winstore, it should permanently authenticating with Git repositories, you can also give this tool a try.
For me it was that a proxy had been set in config.
>git config --global --unset http.proxy
made it work. Running a VM Windows Server 20196 and TFS2015 usind Kerberos (Windows Authentication).If you face this error after changing password for TFS,
Go to Control Panel\User Accounts\Credential Manager
Under the Windows Credentials, Modify the password for the specific Internet or network address.