Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: allow local checkout

It's the first time I'm using Jenkins. I created a new folder with just one file and created a git repository in it. Then I set up Jenkins with that repository.

What I get now is this error:

ERROR: Checkout of Git remote 'path\hello' aborted because it references a local directory, which may be insecure. You can allow local checkouts anyway by setting the system property 'hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT' to true. Finished: FAILURE

I tried to start jenkins using this command:

C:\Users\userName\.jdks\zulu11.56.19-ca-jdk11.0.15-win_x64\bin\java.exe -jar jenkins.war  hudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true

But it didn't work. How can I set this "allow local checkout" to true?

like image 640
Little Monkey Avatar asked Jan 25 '26 15:01

Little Monkey


2 Answers

Define properties using option -D: -Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true

like image 81
Axel Avatar answered Jan 29 '26 13:01

Axel


I have faced the same issue the solution was:

-Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true needs to be BEFORE -jar jenkins.war in the command line call.

The solution is provided from the below recourse:

https://community.jenkins.io/t/checkout-of-git-remote-aborted-because-it-references-a-local-directory/4110

like image 27
Yaser Ananbeh Avatar answered Jan 29 '26 13:01

Yaser Ananbeh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!