Hello, I need to use a Jenkins Shared Library which is based on a local repo in a pipeline, but jenkins does not allow for checking out local repos. i heard that it would work if i ran java -Dhudson.plugins.git.GitSCM.ALLOW_LOCAL_CHECKOUT=true -jar jenkins.war, but that only gave me the error “Invalid configuration elements for type class hudson.plugins.git.GitSCM$DescriptorIMpl : allowLocalCheckout. Available attributes: addGitTagAction, allowSecondFetch, createAccountBasedOnEmail …” etc etc - the gist is that the property allowLocalCheckout is not a valid one. is there another way for me to enable local checkouts?? or is it completely deprecated.
in case it helps, I imported the library into my pipeline like this: “@Library(‘ps-groovy@master’) _” and also “@Library(‘ps-groovy’) _”, where ‘ps-groovy’ is the name of the jenkins shared library
The message “Invalid configuration elements” is from configuration as code. It means that you’ve added something to the configuration as code definition that is not recognized by configuration as code.
There is no configuration as code element named allowLocalCheckout. You need to remove that from your configuration as code definition.
Define the additional property on the command line that starts Jenkins. Instructions are in the git plugin documentation. More details on setting command line arguments depend on the way that you installed Jenkins.