无法使用批处理文件从git获取源 [英] Unable to fetch sources from git using batch file

查看:81
本文介绍了无法使用批处理文件从git获取源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我一直在使用VSTFS一年。


我编写了一个批处理文件,它有git命令来获取远程可用分支,将标签推送到远程等,这一直到现在都在工作。


最近,我在我的队列中添加了另一个构建代理,当它遇到  git命令以获取远程可用分支时,构建不再继续。


我直接在构建代理上运行批处理文件,它运行正常。但是当它被VSTS服务触发时,我遇到了问题。


新的构建代理与前一个构建代理具有相同的配置,并且批处理文件在对其执行构建时工作正常以前的构建代理。


感谢任何帮助或想法。



谢谢,


Krishna

解决方案

嗨克里希纳,


你的错误是什么使用构建代理运行批处理文件时得到了什么?


您的新构建代理服务帐户似乎没有足够的权限来访问远程git存储库。


请检查新代理服务使用的帐户,尝试使用其他帐户进行更改。


如果您无法解决问题,可以在此处提供批处理脚本。


最好的问候



Hi,

I have been using VSTFS for an year now.

I have written a batch file which has git commands to fetch available branches in remote, to push tags to remote etc. which has been working till now.

Recently, I have added another build agent to my Queue and the build is not proceeding any further when it encounters the git command to fetch available branches in remote.

I ran the batch file directly on the build agent and it is working fine. But when it is triggered by VSTS Service I am facing the problem.

The new build agent has same configuration as the previous build agent and the batch file is working perfectly when build is executed on that previous build Agent.

Any help or ideas are appreciated.

Thanks,

Krishna

解决方案

Hi Krishna,

What's the error you got when run the batch file using build agent?

It seems that your new build agent service account not have enough permission to access to the remote git repository.

Please check which account does your new agent service use, try to change it with another account.

If you could not fix your issue, you could provide your batch script here.

Best Regards


这篇关于无法使用批处理文件从git获取源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆