Google OAuth plugin for jenkins

与世无争的帅哥 提交于 2019-12-07 21:48:49

问题


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:

  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?


回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!