【发布时间】:2018-07-11 11:51:06
【问题描述】:
构建代理上存在批处理文件 (c:\myBatchFile.bat)。当批处理文件运行时,它成功地执行了以下操作:
cd c:\myrepo
git pull
但是,当我在 VSTS 构建作业中告诉 powershell 任务运行 c:\myBatchFile.bat 时,会出现以下错误:
error: failed to execute prompt script (exit code 255)
fatal: could not read Username for 'https://whatever.visualstudio.com': No error
注意:c:\myrepo 是 VSTS 作业使用的构建源代码库的旁注。
同样,直接告诉 VSTS 构建作业 powershell 任务发出两个命令(cd c:\myrepo & git pull),这会在 git pull 阶段导致同样的错误。
构建代理机器本身上的 Git 已通过 VSTS 进行身份验证。似乎当第三方(构建作业)尝试在代理上运行命令时(通过在代理上创建 powershell 脚本并执行 powershell 脚本),命令然后失败。
对此有什么想法吗?
谢谢
【问题讨论】:
标签: git build azure-devops pull-request