How to change Global Access Control from Google login to jenkins login ?
Google login is really helpful to control the jenkins access to specific domain users with secured way. But the problem is if you have not configured your google login properly in jenkins > configure global access > google login, then you will face a login problem.
In this case, you will not be able to login to your jenkins dashboard using both “jenkins own database” as well as “google login”.
<securityRealm class="org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm" plugin="email@example.com"> <clientId>CLIENT_ID</clientId> <clientSecret>CLIENT_SECRET</clientSecret> <domain>ONLY_DOMAIN_NAMES</domain> </securityRealm>
You can find a file named config.xml inside /var/jenkins/config.xml (I installed through docker), I hope the config.xml location remains same even without docker.
By modifying this file and restarting the jenkins container will help you to login to your jenkins dashboard.
You will not be able to edit the /var/jenkins/config.xml exist in your docker container directly. So first do
then copy the complete content and create a file in your linux machine somewhere,
then do docker copy to same place.
sudo docker cp config.xml ngjenkins /var/jenkins/config.xml
Now restart your jenkins container.
Hope your issues are resolved now. Still facing issues, please post a comment!!
365 total views, 2 views today