{"record":{"id":"eecc998693190fe4","repo":"SonarSource/sonarqube","slug":"configuration-is-not-complete-s","errorCode":null,"errorMessage":"Configuration is not complete : %s","messagePattern":"Configuration is not complete : (.+?)","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server/sonar-auth-github/src/main/java/org/sonar/auth/github/GithubAppConfiguration.java","lineNumber":70,"sourceCode":"\n  public String getApiEndpoint() {\n    checkConfigurationComplete();\n    return apiEndpoint;\n  }\n\n  /**\n   * Check configuration is complete with {@link #isComplete()} before calling this method.\n   *\n   * @throws IllegalStateException if configuration is not complete\n   */\n  public String getPrivateKey() {\n    checkConfigurationComplete();\n    return privateKey;\n  }\n\n  private void checkConfigurationComplete() {\n    if (!isComplete()) {\n      throw new IllegalStateException(format(\"Configuration is not complete : %s\", toString()));\n    }\n  }\n\n  public boolean isComplete() {\n    return id != null &&\n      privateKey != null &&\n      apiEndpoint != null;\n  }\n\n  @Override\n  public String toString() {\n    return MoreObjects.toStringHelper(GithubAppConfiguration.class)\n      .add(\"id\", id)\n      .add(\"privateKey\", secureToString(privateKey))\n      .add(\"apiEndpoint\", toString(apiEndpoint))\n      .toString();\n  }\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GithubAppConfiguration.java#L52-L88","documentation":"Thrown by GithubAppConfiguration.checkConfigurationComplete, invoked from getId/getApiEndpoint/getPrivateKey, when any of the three required GitHub App fields (id, privateKey, apiEndpoint) is null. The message includes toString() of the configuration showing which fields are missing.","triggerScenarios":"GitHub App-based auth is initialized and settings.appId(), settings.privateKey(), or the API endpoint is null/absent, so isComplete() returns false and any getter call throws.","commonSituations":"Admin enabled GitHub authentication but left the App ID or private key blank; private key file content missing or property not set; partial configuration after migration from OAuth-app to GitHub-app mode.","solutions":["Set all three required properties: sonar.auth.github.app-id, sonar.auth.github.private-key, and the API endpoint.","Paste the full contents of the GitHub App .pem private key file into the private-key setting.","Check the toString() in the message to see exactly which field is null.","Restart/re-test after completing configuration under Administration > Authentication > GitHub."],"exampleFix":"// before\nsonar.auth.github.app-id=123456\n// private-key not set -> not complete\n// after\nsonar.auth.github.app-id=123456\nsonar.auth.github.private-key=-----BEGIN RSA PRIVATE KEY-----\\nMIIE...\\n-----END RSA PRIVATE KEY-----","handlingStrategy":"validation","validationCode":"// Pre-validate all required GitHub App fields before use\nboolean complete = settings.appId() != null && settings.privateKey() != null && settings.apiURL() != null;\nif (!complete) {\n    throw new IllegalStateException(\"Set app-id, private-key and api-url before enabling GitHub App auth\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    config.getPrivateKey();\n} catch (IllegalStateException e) {\n    LOG.error(\"Incomplete GitHub App configuration: {}\", e.getMessage());\n}","preventionTips":["Fill in app-id, private-key and endpoint together before enabling the provider.","Paste the entire .pem private key including BEGIN/END lines.","Test configuration in a staging instance first."],"tags":["configuration","github-app","missing-config","sonarqube"],"backgroundTag":"missing-required-config-field","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"}