繁体   English   中英

Jenkins-Git-无法从Git存储库中检出

[英]Jenkins - Git - Failing to checkout from Git Repository

我有一个git repo,正在Jenkins中使用。 构建始终失败,并出现以下错误:

Seen 1 remote branch
Commencing build of Revision 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc (origin/master)
Checking out Revision 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc (origin/master)
 > C:\Program Files (x86)\Git\cmd\git.exe config core.sparsecheckout
 > C:\Program Files (x86)\Git\cmd\git.exe checkout -f 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc
FATAL: Could not checkout null with start point 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc
hudson.plugins.git.GitException: Could not checkout null with start point 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1497)
    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.checkout(AbstractGitAPIImpl.java:64)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkout(CliGitAPIImpl.java:87)
    at hudson.plugins.git.GitAPI.checkout(GitAPI.java:208)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1273)
    at hudson.plugins.git.GitSCM.access$1100(GitSCM.java:57)
    at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1232)
    at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1208)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2439)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:328)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at hudson.remoting.Engine$1$1.run(Engine.java:63)
    at java.lang.Thread.run(Unknown Source)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\cmd\git.exe checkout -f 30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc" returned status code 1:
stdout: 
stderr: error: unable to create file 

只有一个分支主管,sha-1是最新的结帐帐户。 还会出现以下内容:

Note: checking out '30c6a7a5e6fd30e8519fb3d604a1c195d48ea4fc'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 30c6a7a... Update README.md

我不确定詹金斯为什么认为回购协议处于无头状态?

我遇到了同样的问题,但出问题的是文件路径太长,因此我将工作空间更改为较短的字符串,然后又可以正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM