【发布时间】:2017-11-15 14:48:55
【问题描述】:
在我当前的管道中,我需要 git pull 其他存储库而不是当前存储库,但是当我尝试执行 git pull(使用 powershell 或 cmd)时,它只会被阻塞并且永远不会继续。
如果我尝试运行代理的命令,它们会正确执行。
这是我的 powershell 脚本:
Write-Host (Get-Location)
Set-Location -Path xxx
Write-Host (Get-Location)
#Update the repository, with no prints
Write-Host "Updating"
Invoke-Expression "& git pull origin develop --verbose"
Write-Host "Updated"
exit 0
当我运行它时,我得到了“更新”,但它只是在那里阻塞,没有任何反应。
谁能指出正确的方向吗?
【问题讨论】:
-
不确定,但我的直觉是与 gitserver 握手......你试过 git pull 代理吗?这是我的本地服务器日志,如果可以帮助...
/Users/demokritos/work/src/github.com/anotherfolder/projectK/weirdfolder /Users/demokritos/work/src/github.com/abc Updating Looking up github.com ... done. Connecting to github.com (port 9418) ... 192.60.253.113 done. From git://github.com/abc/xyz * branch master -> FETCH_HEAD = [up to date] master -> origin/master Already up-to-date. Updated -
您是否只是想将另一个遥控器拉到您的
Build.SourcesDirectory,例如您的构建代理中的c:\agent\_work\1\s? -
@Patrick-MSFT 不,我有它在其他文件夹位置,这就是为什么我“设置位置”到另一个路径
-
@JorgeLima 如果是这样,建议您也尝试一下默认
Build.SourcesDirectory,看看错误是否与此有关。如果您在使用Build.SourcesDirectory时可以成功拉取,请检查您的构建服务帐户是否有足够的权限,例如在其他路径上写入。
标签: git powershell tfs build continuous-integration