我们在构建代理主机上安装了git,但 VSTS 继续抱怨无法git.exe
在%PATH%
. 有没有人弄清楚这个问题?
构建日志
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 构建代理识别。