Gerrit / oauth integration - Not found after clicking sign in button

104 views
Skip to first unread message

swapna vegi

unread,
Jun 12, 2024, 9:13:48 AMJun 12
to Repo and Gerrit Discussion
Hi Team,

I'm trying to integrate gerrit and GitHub using Oauth plugin. I have added the plugin in the gerrit resource file and made few changes in the gerrit.config. Now, my gerrit is up and running, but sign in is not working.

When accessing the web UI, I get not found when clicked on sign in button. 

Below is my gerrit.config:

        gerrit.config: |-

            [gerrit]

            # basePath = /var/mnt/git

            [index]

              type = LUCENE

            [auth]

              type = OAUTH

              gitBasicAuthPolicy = HTTP

              loginUrl = /login

            [httpd]

              requestLog = true

              gracefulStopTimeout = 20s

            [user]

              name = Gerrit Code Review

              email = ger...@example.com

              anonymousCoward = Unnamed User

            [container]

              javaOptions = -Xms200m

              javaOptions = -Xmx4g

            [oauth]

              allowedProviders = github

            [plugin "gerrit-oauth-provider-github-oauth"]

              client-id = 123456

              client-secret = 1234567890

              link-to-existing-openid-accounts = true 

              root-url = http://k8sgerrit-demo.eu-west-1.openci.oss.aws.arm.com

              root-url = http://k8sgerrit-demo.eu-west-1.openci.oss.aws.arm.com/oauth

 

Could you please look into it and help me out in fixing this issue?

Regards,
Swapna

swapna vegi

unread,
Jun 14, 2024, 1:24:25 AMJun 14
to Repo and Gerrit Discussion
Hi,

Can someone please address this issue?

Regards,
Swapna

Álvaro Vilaplana García

unread,
Jun 14, 2024, 11:26:22 AMJun 14
to swapna vegi, Repo and Gerrit Discussion
2 comments regarding your configuration. According to the documentation [1]:
-  The property "root-url" should point to the GitHub url: "https://github.com/". (I have been doing some local tests and it is not necessary to specify)
- The property "link-to-existing-openid-accounts" is only used when you use Google OAuth Provider. Therefore you can remove it.

Regards


References:

Could you please look into it and help me out in fixing this issue?

Regards,
Swapna

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/4bd4c0bb-42db-4d9b-b5ab-121dfbc082f3n%40googlegroups.com.


--
______________________________

Álvaro Vilaplana García

David Ostrovsky

unread,
Jun 19, 2024, 11:19:00 AMJun 19
to Repo and Gerrit Discussion
Why you have two different root-url settings?
Should this just be:

 
Can you access this GitHub Enterprise site with browser?


2 comments regarding your configuration. According to the documentation [1]:
-  The property "root-url" should point to the GitHub url: "https://github.com/". (I have been doing some local tests and it is not necessary to specify)

Note, that since this commit: [1] oauth plugin supports GitHub Enterprise as well,
in the context of this issue: [2], with custom "root-url" setting.

swapna vegi

unread,
Jun 26, 2024, 2:37:59 AMJun 26
to Repo and Gerrit Discussion
Yes, I can access the site.

2 comments regarding your configuration. According to the documentation [1]:
-  The property "root-url" should point to the GitHub url: "https://github.com/". (I have been doing some local tests and it is not necessary to specify)
 
 I changed the root-url to GitHub url: "https://github.com/"
Note, that since this commit: [1] oauth plugin supports GitHub Enterprise as well,
in the context of this issue: [2], with custom "root-url" setting.

 
- The property "link-to-existing-openid-accounts" is only used when you use Google OAuth Provider. Therefore you can remove it.

           Yes, I removed that property.
     
      Thanks to all your updates.
      I have successfully integrated oauth provider in gerrit. :) 
Reply all
Reply to author
Forward
0 new messages