为什么Git无法使用Jenkins(错误的配置文件)连接到本地存储库? [英] Why Git fail to connect to local repository with Jenkins (bad config file)?
本文介绍了为什么Git无法使用Jenkins(错误的配置文件)连接到本地存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在Jenkins下的Git中提供本地存储库路径时,我收到错误消息:
When I gave the local repository path in Git under the Jenkins, I am getting the error message:
Failed to connect to repository :
Command "C:\Program Files\Git\bin\git.exe ls-remote -h E:/New folder (2) HEAD" returned status code 128:
stdout:
stderr: fatal: bad config file line 1 in C:/\Users\usr1/.gitconfig
如何解决此问题?
推荐答案
您需要确定%HOME%
(默认情况下未定义)指的是什么(在启动Jenkins之前):
You need to be sure what %HOME%
(which isn't defined by default) refers to (before launching Jenkins):
C:/\Users\usr1
可能不是可访问的路径,而C:\Users\usr1
可能不是.
C:/\Users\usr1
might not be an accessible path, while C:\Users\usr1
might.
如该博客文章中所述:
创建一个新的Execute Shell构建步骤.执行命令:
Create a new Execute Shell build step. Execute the command:
echo $HOME
运行构建并检查输出以查看
$HOME
的位置
这篇关于为什么Git无法使用Jenkins(错误的配置文件)连接到本地存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文