Unable to decorate Github Enterprise PullRequest Check

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • SonarQube 8.0 Developer Edition (docker image)
  • GitHub Enterprise 2.18.3
  • OpenJDK 13
  • what are you trying to achieve
  • Getting PullRequests properly decorated. Everything else is working fine. The PR analysis is performed successfully and I can also look at them on the sonarqube instance. Only the linking to the PRs on Github is not working. (This was working on SonarQube 7.7 before not sure if the 7.9 or 8.0 upgrade path broke it :frowning:)
  • what have you tried so far to achieve this
  • Github Authentication is on and working (but I know it’s not using the same OAuth mechanism, however it’s displayed in the context parameters that’s why I’m mentioning it).
  • Followed all the instructions on: https://docs.sonarqube.org/latest/instance-administration/github-application/
  • Logs in DEBUG mode show only the following: [c.s.C.A.B.A.A.D] GET response did not have expected HTTP code (was 401): {"message":"Bad credentials","documentation_u rl":"https://developer.github.com/enterprise/2.18/v3"} - Not exactly sure what I cannot access though. I’ve build my own JWT token and was at least able to access <github_enterprise>/api/v3/app
  • The Github application is installed on organization level. Even tried to install a completely new Application without any changes.
  • Sonar context:
    Server context:
  - sonar.alm.github.app.name=<appname>
  - sonar.alm.github.app.privateKeyContent.secured=******
  - sonar.auth.github.apiUrl=https://<ghe-url>/api/v3/
  - sonar.auth.github.clientId.secured=******
  - sonar.auth.github.clientSecret.secured=******
  - sonar.auth.github.enabled=true
  - sonar.auth.github.loginStrategy=Same as GitHub login
  - sonar.auth.github.webUrl=https://<ghe-url>/

Project scanner context:

  - sonar.projectName=<repository>
  - sonar.projectVersion=12.9-SNAPSHOT
  - sonar.pullrequest.base=develop
  - sonar.pullrequest.branch=<branchName>
  - sonar.pullrequest.github.repository=<organame>/<repository>/
  - sonar.pullrequest.key=2055
  - sonar.pullrequest.provider=github

Any help would be appreciated :slight_smile:

The issue was here. The ending / caused the issue once I removed it, decorations where possible again.

1 Like