一尘不染

詹金斯和吉特的麻烦

jenkins

现在,我正在尝试使用Git插件从bitbucket中提取存储库,并在jenkins中构建它。但是,只要这样做,我就会得到:

FATAL: Could not checkout null with start point <Starting Point>
hudson.plugins.git.GitException: Could not checkout null with start point <Starting Point>
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.checkoutBranch(CliGitAPIImpl.java:894)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1229)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1205)
at hudson.FilePath.act(FilePath.java:906)
at hudson.FilePath.act(FilePath.java:879)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1205)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1394)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
at hudson.model.Run.execute(Run.java:1593)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f <Starting Point>" returned status code 1:
stdout: 
stderr: error: unable to unlink old <File> (Permission denied)
error: unable to unlink old <File> (Permission denied)
error: unable to unlink old <File> (Permission denied)
error: unable to unlink old <File> (Permission denied)
error: unable to create file <File> (Permission denied)
error: unable to unlink old <File> (Permission denied)

我尝试过手动删除OSX中非jenkins用户下的文件,它可以工作,但随后将无法创建文件。

编辑:我实际上通过添加“执行外壳命令”步骤并插入“ Git pull”而不是使用Git插件来解决了问题。


阅读 336

收藏
2020-07-25

共1个答案

一尘不染

需要定义起点参数

尝试以下方法:

git checkout -f HEAD
2020-07-25