问题
I have installed the Google Login plugin on Jenkins 2.86: https://wiki.jenkins.io/display/JENKINS/Google+Login+Plugin
and followed this guide:
Login to the Google Developers Console
Create a new project
Under APIs & Auth -> Credentials, Create a new Client ID
The application type should be "Web Application"
The authorized redirect URLs should contain ${JENKINS_ROOT_URL}/securityRealm/finishLogin
Enter the created Client Id and secret into the fields below.
using the information from the google console:
In the Jenkins Global security configuration:
But when I logout and login I get the error:
- That’s an error.
Error: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://1.111.111.111:8080/securityRealm/finishLogin
(where 1.111.111.111 above is a mask for the correct IP).
What have I missed?
回答1:
You need to set the URL of jenkins correctly in
http://your-jenkins/configure
Setting is under:
Jenkins Location > Jenkins URL
Set this with value: http://your-jenkins.net instead of IP.
回答2:
The problem that you are having is that you have to specify on the Authorized** Field the same URL that you have defined as your {jenkins URL} environment variable.
Check out this link http://www.tothenew.com/blog/jenkins-google-authentication/
来源:https://stackoverflow.com/questions/47024403/google-oauth-plugin-for-jenkins