Jenkins无法从远程git获取代码 [英] Jenkins not able to fetch code from remote git
问题描述
从远程Git存储库获取更改
> git config remote.origin.url< url> #timeout = 10
错误:获取远程回购'origin'出错
hudson.plugins.git.GitException:无法从< url>在hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
在hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
在hudson.plugins .git.GitSCM.checkout(GitSCM.java:1016)
在hudson.scm.SCM.checkout(SCM.java:484)在hudson.model.AbstractProject.checkout
(AbstractProject.java:1270 )
在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
处hudson.model jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
。 AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:528)
在hudson.model.Run.execute(Run.java:1759)
在hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
导致:hudson.plugins.git .GitException:命令git config remote.origin.url< url>返回状态码4:
st dout:
stderr:错误:未能写入新的配置文件.git / config.lock
我无法找出根本原因。
我检查了jenkins home文件夹的权限和所有权,它是/ var / lib / jenkins: -
drwxrwxrwx 17 jenkins jenkins 4096 Jun 25 04:30 jenkins
jenkins工作空间文件夹中.git文件夹的权限和所有权是: -
drwxrwxrwx 8 jenkins jenkins 4096 Jun 30 21:51 .git
请指导我解决这个问题。
Jenkins VM在磁盘空间不足时遇到它。清理它,不再看到这个问题。
My jenkins build is suddenly not working now.The error is as follows:-
Fetching changes from the remote Git repository
> git config remote.origin.url <url> # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from <url>
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016)
at hudson.scm.SCM.checkout(SCM.java:484)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1759)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: hudson.plugins.git.GitException: Command "git config remote.origin.url <url> returned status code 4:
stdout:
stderr: error: failed to write new configuration file .git/config.lock
I am not able to figure out the root cause. I have checked the permission and ownership for jenkins home folder which is /var/lib/jenkins:- drwxrwxrwx 17 jenkins jenkins 4096 Jun 25 04:30 jenkins
Permission and ownership of .git folder inside workspace folder of jenkins is:- drwxrwxrwx 8 jenkins jenkins 4096 Jun 30 21:51 .git
Please guide me fix the problem.
Experienced it when Jenkins VM was running out of disk space. Cleaned it up, don't see this problem anymore.
这篇关于Jenkins无法从远程git获取代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!