keke
(shuhuike)
January 21, 2022, 8:11am
1
Must-share information (formatted with Markdown ):
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Enterprise Edition Version 8.9.3 (build 48735)
what are you trying to achieve
Integration with GitHub so I can directly create a project associated with github
what have you tried so far to achieve this
I am admin user, and in sonarqube configuration - alm integration- I add enterorise github and check with Configuration valid。And I can enable Authenticate with GitHub , now I can also sign in to SonarQube with GitHub credentials.
But when I goto project page to add a new project from github using sonarqube admin accoun, it say I can’t access this page. can anyone helps on this issue?
keke
(shuhuike)
January 25, 2022, 8:50am
2
10.132.138.51 - - [25/Jan/2022:08:43:59 +0000] "GET /api/alm_settings/list? HTTP/1.1" 200 108 "https://sonarqube.shdrapps.disney.com/projects/create?mode=github" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjm"
10.132.138.51 - - [25/Jan/2022:08:43:59 +0000] "GET /api/alm_integrations/get_github_client_id?almSetting=shdr-se-devops-sonarqube HTTP/1.1" 200 35 "https://sonarqube.shdrapps.disney.com/projects/create?mode=github" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjn"
10.132.138.51 - - [25/Jan/2022:08:44:00 +0000] "GET /oauth2/callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fenterprise%2F3.0%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch HTTP/1.1" 302 - "https://sonarqube.shdrapps.disney.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjo"
10.132.138.51 - - [25/Jan/2022:08:44:00 +0000] "GET /sessions/unauthorized HTTP/1.1" 200 - "https://sonarqube.shdrapps.disney.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjp"
10.132.138.51 - - [25/Jan/2022:08:44:00 +0000] "GET /api/l10n/index?locale=en-US&ts=2022-01-25T07%3A58%3A32%2B0000 HTTP/1.1" 304 - "https://sonarqube.shdrapps.disney.com/sessions/unauthorized" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjr"
10.132.138.51 - - [25/Jan/2022:08:44:00 +0000] "GET /api/navigation/global HTTP/1.1" 200 634 "https://sonarqube.shdrapps.disney.com/sessions/unauthorized" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjq"
10.132.138.51 - - [25/Jan/2022:08:44:02 +0000] "GET / HTTP/1.1" 200 - "https://sonarqube.shdrapps.disney.com/sessions/unauthorized" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" "AX5xofKUVD4xgoQcARjs"
Hi, that’s a permission issue. It means that on the permission template, you, as a user, are not granted any permission on a freshly created project.
As I see that you are an admin, you can:
Explicitly grant yourself permissions on this project once created
Modify the permission template to be granted permissions on every new project
Hi again @keke , it actually looks like there is an error:
This would mean that the callback URL (configured on the GH app side) does not match your SonarQube URL. Could you please double-check your GH app callback URL configuration, please?