Sonar dev server not connecting with github

Hi Team,

I am using sonar Qube developer edition. SonarQube ID information are :
Server ID: BF41A1F2-AXOfwjy8X_4EnVo6YeXp
Version: 8.4.1.35646
I am trying to add project from git hub. I followed all the steps to connect GitHub with sonarQube and it is synced , but while trying to fetch project from GitHub getting below error.

"You are unauthorized to access this page. Please contact to the administrator."
http://localhost:9002/sessions/unauthorized
below are the logs:
2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.platform.web.WebServiceFilter@397c4a47](mailto:org.sonar.server.platform.web.WebServiceFilter@397c4a47) [pattern=UrlPattern{inclusions=[/api/issues/delete_comment.*, ...], exclusions=[/api/authentication/login.*, ...]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.platform.web.WebServiceReroutingFilter@78005176](mailto:org.sonar.server.platform.web.WebServiceReroutingFilter@78005176) [pattern=UrlPattern{inclusions=[/api/components/bulk_update_key, ...], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.authentication.InitFilter@8adab](mailto:org.sonar.server.authentication.InitFilter@8adab) [pattern=UrlPattern{inclusions=[/sessions/init/*], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.authentication.OAuth2CallbackFilter@2c80e1a4](mailto:org.sonar.server.authentication.OAuth2CallbackFilter@2c80e1a4) [pattern=UrlPattern{inclusions=[/oauth2/callback/*], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.authentication.ws.LoginAction@62cc0dce](mailto:org.sonar.server.authentication.ws.LoginAction@62cc0dce) [pattern=UrlPattern{inclusions=[/api/authentication/login], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.authentication.ws.LogoutAction@134ecdfb](mailto:org.sonar.server.authentication.ws.LogoutAction@134ecdfb) [pattern=UrlPattern{inclusions=[/api/authentication/logout], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter [org.sonar.server.authentication.ws.ValidateAction@520a4c28](mailto:org.sonar.server.authentication.ws.ValidateAction@520a4c28) [pattern=UrlPattern{inclusions=[/api/authentication/validate], exclusions=[]}]

2020.08.06 14:12:02 INFO web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning is not started as there are no projects in this situation.

2020.08.06 14:12:02 INFO web[][o.s.s.p.p.PlatformLevelStartup] Running Developer Edition

2020.08.06 14:12:02 INFO web[][o.s.s.p.Platform] WebServer is operational

2020.08.06 14:28:21 WARN web[AXPC7zgwPlSGgd89AADs][o.s.s.a.AuthenticationError] No provider key found in URI

2020.08.06 15:29:27 WARN web[AXPC7zgwPlSGgd89AAFL][o.s.s.a.AuthenticationError] No provider key found in URI

2020.08.06 15:29:37 WARN web[AXPC7zgwPlSGgd89AAFd][o.s.s.a.AuthenticationError] No provider key found in URI

2020.08.06 15:33:09 WARN web[AXPC7zgwPlSGgd89AAFv][o.s.s.a.AuthenticationError] No provider key found in URI

Hi,

Welcome to the community!

I’m struggling to understand the stage at which you’re experiencing a failure. You say

But SonarQube doesn’t “fetch” anything; checkout is done by your CI system before build & analysis.

 
Ann

HI Ann,

I am asking for the below scenario, hope it will explain more.

When I do Click on github I go to the screen Github Repository and then the screen doesn’t load completely and go the URL ‘http://localhost:9002/sessions/unauthorized

For reference please refer the below screen shots hope it will help to understand.

1.)

Regards,

Neha Khandelwal

Hi Neha,

  1. Did you ever get redirected to GitHub, to authenticate and authorize the App?

  2. Could you open your browser’s developer tools (Ctrl+shift+I), go to the network tab, check “preserve logs”, and see if there are any errors there?