{"record":{"id":"e426f3984537d86a","repo":"SonarSource/sonarqube","slug":"github-configuration-is-not-complete-please-check","errorCode":null,"errorMessage":"Github configuration is not complete. Please check your configuration under the Authentication > GitHub tab","messagePattern":"Github configuration is not complete\\. Please check your configuration under the Authentication > GitHub tab","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubIdentityProvider.java","lineNumber":191,"sourceCode":"\n  private boolean isOrganizationMembershipRequired() {\n    return !settings.getOrganizations().isEmpty();\n  }\n\n  private boolean isMemberOfInstallationOrganization(Set<String> userOrganizationNames) {\n    GithubAppConfiguration githubAppConfiguration = githubAppConfiguration();\n    List<GithubAppInstallation> githubAppInstallations = githubAppClient.getWhitelistedGithubAppInstallations(githubAppConfiguration);\n    return githubAppInstallations.stream()\n      .map(GithubAppInstallation::organizationName)\n      .anyMatch(userOrganizationNames::contains);\n  }\n\n  private GithubAppConfiguration githubAppConfiguration() {\n    String apiEndpoint = Optional.ofNullable(settings.apiURL()).orElse(DEFAULT_API_URL);\n    try {\n      return new GithubAppConfiguration(parseLong(settings.appId()), settings.privateKey(), apiEndpoint);\n    } catch (NumberFormatException numberFormatException) {\n      throw new IllegalStateException(\"Github configuration is not complete. Please check your configuration under the Authentication > GitHub tab\");\n    }\n  }\n\n  private ServiceBuilder newScribeBuilder(OAuth2IdentityProvider.OAuth2Context context) {\n    checkState(isEnabled(), \"GitHub authentication is disabled\");\n    return new ServiceBuilder(settings.clientId())\n      .apiSecret(settings.clientSecret())\n      .callback(context.getCallbackUrl());\n  }\n\n}\n","sourceCodeStart":173,"sourceCodeEnd":203,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubIdentityProvider.java#L173-L203","documentation":"Thrown by githubAppConfiguration when parseLong(settings.appId()) fails because the configured GitHub App ID is not a numeric string. It wraps the NumberFormatException into a friendlier IllegalStateException pointing admins to the GitHub auth configuration page.","triggerScenarios":"GitHub auth provider initializes and settings.appId() contains a non-numeric value (e.g. the app's slug/name instead of the numeric App ID, or a leftover client ID pasted into the App ID field).","commonSituations":"Admin pasted the GitHub App's client ID (starts with 'Iv1...') or the app slug into the App ID field; whitespace or invisible characters in the setting; field left as placeholder text.","solutions":["Set sonar.auth.github.app-id to the numeric App ID from the GitHub App settings page (General > About > App ID).","Do not confuse the App ID with the Client ID (Iv1...) — use the numeric value only.","Trim whitespace/invisible characters from the configured value.","Also verify sonar.auth.github.private-key is set, since it is required together with the App ID."],"exampleFix":"// before\nsonar.auth.github.app-id=Iv1.abc123def456\n// after\nsonar.auth.github.app-id=123456","handlingStrategy":"validation","validationCode":"// Validate the app-id is numeric before initializing the provider\nif (settings.appId() == null || !settings.appId().matches(\"\\\\d+\")) {\n    throw new IllegalArgumentException(\"sonar.auth.github.app-id must be the numeric GitHub App ID\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    GithubAppConfiguration cfg = githubAppConfiguration();\n} catch (IllegalStateException e) {\n    LOG.error(\"GitHub App settings invalid: {}\", e.getMessage());\n}","preventionTips":["Copy the numeric App ID from GitHub App settings > About, not the Client ID.","Strip whitespace when pasting configuration values.","Document the difference between App ID and Client ID for admins."],"tags":["configuration","github-app","numberformat","sonarqube"],"backgroundTag":"invalid-config-value","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}