VSTS 构建 vNext 获取源 - Git.exe 警告
VSTS Build vNext Get Sources - Git.exe Warning
我们在构建代理主机上安装了 git,但 VSTS 继续抱怨无法在 [=13] 中找到 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\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\s
2016-06-01T14:16:57.8020148Z Checked out branch refs/heads/MyBranch for repository MyRepo at commit dcf2e7a08159a102394f64e79c98e8921ccc4798
最大的问题是我们每次都因为这个问题克隆了整个仓库。这会减慢我们 CI 策略的采用速度。
我们的路径中有 C:\Program Files\Git\cmd
,其中包含 git.exe
,但它没有被 VSTS 构建代理识别。
VSTS Build vNext 不使用 System %PATH%
,而是 User %PATH%
。有 (2) 种修复方法 - 将路径分配给代理用户或编辑注册表以扩展用户路径。
我们刚刚将 C:\Program Files (x86)\Git\cmd
添加到 HKEY_USERS\<Build Agent User SID>\Environment\Path
我们在构建代理主机上安装了 git,但 VSTS 继续抱怨无法在 [=13] 中找到 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\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\s
2016-06-01T14:16:57.8020148Z Checked out branch refs/heads/MyBranch for repository MyRepo at commit dcf2e7a08159a102394f64e79c98e8921ccc4798
最大的问题是我们每次都因为这个问题克隆了整个仓库。这会减慢我们 CI 策略的采用速度。
我们的路径中有 C:\Program Files\Git\cmd
,其中包含 git.exe
,但它没有被 VSTS 构建代理识别。
VSTS Build vNext 不使用 System %PATH%
,而是 User %PATH%
。有 (2) 种修复方法 - 将路径分配给代理用户或编辑注册表以扩展用户路径。
我们刚刚将 C:\Program Files (x86)\Git\cmd
添加到 HKEY_USERS\<Build Agent User SID>\Environment\Path