[英]How to run shell script in linux agent of a TFS server
I not able to understand these below errors, can someone point out why am i getting these errors, when try run shell script which is in github error: pathspec 'refs/remotes/origin/master' did not match any file(s) known to git Git checkout failed with exit code: 1
. 我无法理解以下错误,有人可以指出为什么我尝试运行github error: pathspec 'refs/remotes/origin/master' did not match any file(s) known to git Git checkout failed with exit code: 1
shell脚本时会出现这些error: pathspec 'refs/remotes/origin/master' did not match any file(s) known to git Git checkout failed with exit code: 1
。
******************************************************************************
Starting: Build
******************************************************************************
Current agent version: '2.105.7'
******************************************************************************
Starting: Get Sources
******************************************************************************
Syncing repository: Job (TfsGit)
git version
git config --get remote.origin.url
git config gc.auto 0
git config --get-all
http.http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job.extraheader
git config --get-all http.proxy
git -c http.extraheader="AUTHORIZATION: bearer ********" fetch --tags --prune --progress origin
git checkout --progress --force refs/remotes/origin/master
error: pathspec 'refs/remotes/origin/master' did not match any file(s) known to git
Git checkout failed with exit code: 1
******************************************************************************
Finishing: Get Sources
*****************************************************************************
*
*****************************************************************************
*
Starting: Post Job Cleanup
******************************************************************************
Cleaning any cached credential from repository: Job (Git)
git remote set-url origin
http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job
git remote set-url --push origin
http://54.183.83.168:8080/tfs/DefaultCollection/_git/Job
******************************************************************************
Finishing: Post Job Cleanup
******************************************************************************
******************************************************************************
Finishing: Build
******************************************************************************
是的,我终于弄清楚了,我必须在服务选项卡/部分的tfs中添加带有凭据的github存储库作为tfs的端点(我仍然想知道这是否绝对必要),而且我还必须在我的克隆该存储库。 linux machine agent,在shell-script path字段中提供该路径,然后在“ Arguments”字段中传递我的脚本特定参数,添加所有这些后,我的脚本已成功执行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.