詹金斯不能从使用Windows批处理命令从git仓库中拉出 [英] jenkins cant pull from git repository using windows batch command

查看:191
本文介绍了詹金斯不能从使用Windows批处理命令从git仓库中拉出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建我的jenkins项目时,我想首先从我的git存储库中提取它,以便代码保持最新状态,我可以看到 git status git --version 通常情况下,但是当它来到 git pull 时,控制台输出停留在像这样的加载中:





当我在命令提示符中尝试完全相同的命令和相同的目录时,我可以在不到2秒的时间内成功完成取消。





有没有什么可以让jenkins命令和cmd命令有所不同?
i使用windows xp和ssh来验证git仓库。

解决方案

如果 ssh 被使用,确保执行作业时设置 HOME 至关重要: ssh 将在%HOME%下查找 id_rsa id_rsa.pub (私钥和公钥) \.ssh



有人怀疑,可以使用 EnvInject 插件,它将为给定作业添加环境变量。


when i build my jenkins project i want to pull it first from my git repository so the code is up to date, i can see git status and git --version normally, but when it come to git pull the console output stuck on loading like this:

When i try the exact same command and same dir in command prompt i can pull successfully in less than 2 seconds

is there anything that make different between jenkins command and cmd command? i use windows xp with ssh to authenticating with git repository.

解决方案

If ssh is used, it is crucial to make sure HOME is set when the job is executed: ssh will look for id_rsa and id_rsa.pub (private and public keys) under %HOME%\.ssh.

In doubt, one can use the EnvInject plugin which will add environment variables for a given job.

这篇关于詹金斯不能从使用Windows批处理命令从git仓库中拉出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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