【发布时间】:2017-06-26 23:50:18
【问题描述】:
我尝试关注these steps 在 TFS 2015(更新 3)构建步骤中添加一些 git 命令。
为了测试,我尝试了“git ls-files”,效果很好。
然后我尝试了“git pull”。
它会显示:
2017-02-09T03:23:36.7164903Z git pull
2017-02-09T03:23:36.7164903Z Error message highlight pattern:
2017-02-09T03:23:36.7164903Z Warning message highlight pattern:
2017-02-09T03:23:36.9660887Z bash: /dev/tty: No such device or address
2017-02-09T03:23:36.9660887Z error: failed to execute prompt script (exit code 1)
2017-02-09T03:23:36.9660887Z fatal: could not read Username for 'http://htwb0228:8080': Invalid argument
但是,Git 通过本地操作在 TFS 服务器的 '_work' 文件夹上运行良好。
我已经尝试了很多解决方案。对我来说,它们不起作用。
我尝试使用Git Build Tools,仍然失败。
2017-02-09T01:53:41.3965148Z git pull
2017-02-09T01:53:41.3965148Z Error message highlight pattern:
2017-02-09T01:53:41.3965148Z Warning message highlight pattern:
2017-02-09T01:53:42.4729079Z fatal: Authentication failed for 'http://OAuth:********@htwb0228:8080/tfs/DefaultCollection/KKKKK/_git/PPPP/'
对于这个问题,我推荐this page 添加两个变量(VSO_GIT_USERNAME 和 VSO_GIT_PASSWORD)来构建脚本。还是不行。
我将 Git 升级到 2.11.1 并在 TFS 服务器上安装了GCMW。
另外,通过引用this page,我也在TFS服务器上输入了这些命令。
git config --global credential.http://htwb0228:8080.integrated true
git config --global credential.http://htwb0228.integrated true
git config --global credential.htwb0228.integrated true
git config --global credential.integrated true
还是不行。
还有其他建议吗?非常感谢。
【问题讨论】: