Skip to content

Instantly share code, notes, and snippets.

@stefancrain
Last active July 31, 2018 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefancrain/d69c6bd63ea2ae8335c687f497140e95 to your computer and use it in GitHub Desktop.
Save stefancrain/d69c6bd63ea2ae8335c687f497140e95 to your computer and use it in GitHub Desktop.
Disabling Jenkins auth when auth method fails
#!/bin/bash
# Backup Jenkins Config
cp $JENKINS_HOME/config.xml $JENKINS_HOME/config-bk.xml
# Set useSecurity to false to enable login when auth temporarily
# This opens Jenkins to all with access to the URL
grep "useSecurity" $JENKINS_HOME/config.xml
sed -i "s#<useSecurity>true#<useSecurity>false#g" $JENKINS_HOME/config.xml
grep "useSecurity" $JENKINS_HOME/config.xml
# Restart Jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment