Checkout of Git remote aborted because it references a local directory

After updating Jenkins, I now cannot load my shared directory. I get this:

ERROR: Checkout of Git remote ‘D:/xxxxx/git/JenkinsSharedLibrary’ 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.

Online it says the solution to this is to start Jenkins with -Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true

But that didn’t fix the issue. Any ideas what else I can try?

OK the issue was that -Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true needs to be BEFORE -jar jenkins.war in the command line call. Several examples I saw online did not show that, it had it afterward, which does not work.

2 Likes

Thanks a lot for your feedback @sabibo :pray: .