Thanks for an excellent insight mawinter69. The groovy init script syntax that I used to duplicate the problem was setting the system property like this:
System.setProperty('hudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL', 'disabled')
Since the system property is read only once at startup, it did not help to set the system property from groovy, because the hudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL variable was initialized before the system property was modified.
Your suggestion to set the field in the class is much better and works very well. I add the groovy init script line:
hudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL='disabled'
I think that it would help if the git plugin documentation that mentions hudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL were extended to more precisely describe the techniques to set the value. It can either be set from the Java command line with
java -Dhudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL=disabled jenkins.war
or it can be set from a groovy script in the init.groovy.d directory with a statement like this:
hudson.plugins.git.GitStatus.NOTIFY_COMMIT_ACCESS_CONTROL='disabled'
sirine707 would you like to submit the documentation improvement?
I'm not able to duplicate the problem as described. Steps that I took while attempting to duplicate it include:
When I ran that curl command with the property set to the value disabled, the notifyCommit caused the repository to be polled and the job to be built.
I suspect that the system property is not being set from the Java command line, either because it is being set in the wrong location on the Java command line or is not being passed on the command line in a way that is detected by Jenkins. You can check if the property is set by opening the /manage/systemInfo URL and unhiding all the values. On my system, when the property is set, there is an entry that shows the value of that property.