【发布时间】:2016-06-01 14:26:20
【问题描述】:
我们在构建代理主机上安装了 git,但 VSTS 继续抱怨无法在 %PATH% 中找到 git.exe。有没有人发现这个问题?
构建日志
2016-06-01T14:15:23.5193018Z Syncing repository: MyRepo (Git)
2016-06-01T14:15:23.9412033Z Running 'git clean -fdx' on D:\BuildAgents_VSTS\A0\_work\22\s.
2016-06-01T14:15:23.9567937Z ##[warning]Git.exe is not installed or the path to Git.exe is not included in %PATH%.
2016-06-01T14:15:23.9567937Z ##[warning]Unable to run "git clean -fdx" and "git reset --hard HEAD" successfully, delete source folder instead.
2016-06-01T14:15:25.7068381Z Starting clone
2016-06-01T14:15:54.6447654Z Checking out dcf2e7a08159a102394f64e79c98e8921ccc4798 to D:\BuildAgents_VSTS\A0\_work\22\s
2016-06-01T14:16:57.8020148Z Checked out branch refs/heads/MyBranch for repository MyRepo at commit dcf2e7a08159a102394f64e79c98e8921ccc4798
最大的问题是因为这个问题,我们每次都克隆整个 repo。这减缓了我们 CI 策略的采用速度。
我们的路径中有 C:\Program Files\Git\cmd,其中包含 git.exe,但它没有被 VSTS 构建代理识别。
【问题讨论】:
标签: git continuous-integration azure-devops azure-pipelines-build-task azure-pipelines