Reputation: 23
Right now I'm trying to pull a repository from bitbucket with the Git plugin, and build it within jenkins. However, whenever I do this, I get:
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)
I've tried manually deleting the files under the non-jenkins user in OSX, and it works, but then it will be unable to create a file.
EDIT: I actually fixed the problem by adding an "Execute shell command" step, and inserting "Git pull ", rather than using the Git plugin.
Upvotes: 1
Views: 4111
Reputation: 44
The Starting Point parameter needs to be defined
Try this instead:
git checkout -f HEAD
Upvotes: 3