You are not authorized to access this page. please contact admin--github integration

Must-share information

:white_check_mark: Versions in use

  • SonarQube Server: sonarqube:community (latest Docker image)
  • Scanner: Not yet configured
  • Authentication Plugin: GitHub OAuth (default plugin)
  • Database: PostgreSQL 15 (postgres:15 Docker image)

:rocket: Deployment Method

  • Deployed via: Docker (docker run commands)
  • Network: Custom Docker bridge network alert_network
  • Volumes: Persistent Docker volumes for both PostgreSQL and SonarQube data/logs/extensions

:bullseye: What I’m Trying to Achieve

I want to enable GitHub login for SonarQube and allow access for members of my GitHub organization nyltechnology.
My GitHub username is AnserAliNYL, and I am a confirmed member of that organization.


:test_tube: What I’ve Tried So Far

  • Logged in with GitHub successfully (UI redirect works)
  • Encountered this error upon redirect:
You're not authorized to access this page. Please contact the administrator.

Reason:
'AnserAliNYL' must be a member of at least one organization: 'nyltechnology'
  • Confirmed that the GitHub organization nyltechnology exists: https://github.com/nyltechnology
  • Tried incognito/private browser sessions
  • Reset volumes and restarted containers

:spouting_whale: Docker Commands Used

# Start PostgreSQL
docker run -d --name postgres-sonarqube   --network alert_network   -e POSTGRES_USER=sonar   -e POSTGRES_PASSWORD=sonar   -e POSTGRES_DB=sonarqube   -v pg_data:/var/lib/postgresql/data   postgres:15

# Start SonarQube
docker run -d --name sonarqube-custom   --network alert_network   -p 127.0.0.1:9000:9000   -e SONAR_WEB_CONTEXT=/sonarqube   -e SONAR_JDBC_URL=jdbc:postgresql://postgres-sonarqube:5432/sonarqube   -e SONAR_JDBC_USERNAME=sonar   -e SONAR_JDBC_PASSWORD=sonar   -v sonarqube_data:/opt/sonarqube/data   -v sonarqube_extensions:/opt/sonarqube/extensions   -v sonarqube_logs:/opt/sonarqube/logs   sonarqube:community

:red_question_mark: Questions

  1. Why is SonarQube not recognizing my GitHub org membership?
  2. Should I use a GitHub OAuth App or GitHub App for more control(currently using GitHub APP)?

Thanks in advance for the help!

Hi,

It sounds like you haven’t created the nyltechlology group in SonarQube. For group synchronization to work, the same groups have to exist on both sides. Spelling (and capitalization &etc) counts!

 
HTH,
Ann