为什么使用GIT的TFS不能从命令行工作? [英] Why TFS with GIT is not working from command line?

查看:375
本文介绍了为什么使用GIT的TFS不能从命令行工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Microsoft Team Foundation Server Git存储库中使用git命令行工具。



但每次我想访问远程回购时,验证都会失败。当然,我正在使用Active Directory(这是一个TFS服务器)。 git repo管理在Visual Studio中完美工作。 (即使是推,同步,克隆等)。

 克隆到'blabla'
致命: http:// server:8080 / tfs / BlaCollection / _git / blabla /'

这种模式并总是失败。
$ b


  • DOMAIN \用户名

  • 用户名@ domainforest

  • ul>

    任何人都可以通过命令行工具使用git服务器连接到TFS?
    在我的公司,我们使用令牌来登录Windows,可能是这个原因吗?

    解决方案

    解决方案,我会在这里发布:



    使用命令:

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

    当然,使用您自己的TFS服务器主机名替换 [tfs_server]

    当Credential Manager要求输入凭证时,按OK。 (我这样使用Kerberos进行身份验证)。



    在这里查看更多信息 https:// github .COM /微软/混帐-凭据管理器换的Windows#齐认为,微软是维持此结果的原因,确实最GCM - 不工作作为预期与 - TFS

    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?

    解决方案

    Finally a collegue hit the solution and I will 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 host name.

    When Credential Manager asks for credentials just leave blanks and press OK. (I this way authentication will be performed using Kerberos).

    Check here for more information https://github.com/Microsoft/Git-Credential-Manager-for-Windows#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs

    这篇关于为什么使用GIT的TFS不能从命令行工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆