Why doesn't TFS with GIT work from the command line?

I want to use git command line tools with Microsoft Team Foundation Server git repositories.

But every time I want to access remote repositories, authentication fails. And of course, I'm using Active Directory (this is a TFS server). Git repo management works fine with Visual Studio. (even push, sync, clone, etc.).

Cloning into 'blabla'
fatal: Authentication failed for 'http://server:8080/tfs/BlaCollection/_git/blabla/'

I intend to use these patterns and always fail.

  • DOMAIN \ username
  • username @domainforest

Has anyone connected using command line tools to TFS with a git server? In my company, we use tokens to log into Windows, maybe the reason?

+17
source share
9 answers

Finally, college got into the solution, and I'll post it here:

Use the command:

git config --global credential.http://[tfs_server].integrated true

Of course, replace [tfs_server]with your own TFS server hostname.

When Credential Manager asks for credentials, just leave spaces and click OK. (This way authentication will be done using Kerberos).

More details here. Https://github.com/Microsoft/Git-Credential-Manager-for-Windows#qi-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as -expected-- TVET

+11
source

Windows credentials -> General credentials

Then add a new element with "git:" before http: // that is:

bastard: http://Example.com

\

+23

, . .

  1. git .
  2. Windows, Windows Search, git , . enter image description here
+6

, Windows, , TFS. Windows-Control Panel-

PatrickLu-MSFT

, . Windows, , , .

+2

> > Windows.

git: , git .

Windows TFS, git .

+2

TFS,

\ \

" Windows" - .

0

, . >git config --global --unset http.proxy . Windows Server 20196 TFS2015 Kerberos ( Windows).

0

AD?

  • ( lol), > > > Windows.
  • , git: http...
  • / , . , , /
0

--username --password , :

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1 -u=Domain\username -p=xxx

-u, --username = VALUE TFS
-p, --password = VALUE TFS

, Windows, , TFS. Windows-Control Panel- Credential Manager


Visual Studio Windows, Git Credential Winstore. Git Credential Winstore, Git, .

-1

All Articles