3
votes

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:

enter image description here

In the Jenkins Global security configuration:

enter image description here

But when I logout and login I get the error:

  1. 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?

2
u123: No can't put a public IP address in Authorized redirect URIs. It should be a Domain Name.Hussain K

2 Answers

1
votes

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.

0
votes

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/