Issue
When configuring an Organization Folder using a GitHub App credential in CloudBees CI, the UI shows the following error:
An internal error occurred during form field validation (HTTP 500). Please reload the page and if the problem persists, ask the administrator for help.
The logs show:
WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving $JENKINS_URL/job/$JOB_NAME/descriptorByName/org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator/checkCredentialsId java.lang.IllegalArgumentException: Owner mismatch: $CREDENTIAL_OWNER_NAME vs. at PluginClassLoader for github-branch-source//org.jenkinsci.plugins.github_branch_source.GitHubAppCredentials.withOwner(GitHubAppCredentials.java:343)
Resolution
Root cause: There is a mismatch between the Owner field configured at the GitHub App credential level (under Advanced settings) and the Owner field at the Organization Folder level. The exception is not caught properly, resulting in an HTTP 500 error instead of a user-friendly validation message.
Ensure the Owner field value matches between the GitHub App credential and the Organization Folder configuration:
A) At the GitHub App credential level:
-
Navigate to .
-
Select the appropriate credentials domain.
-
Edit the GitHub App credential (kind: GitHub App).
-
Click
Advanced. -
Note the value in the
Ownerfield (or leave it blank).
B) At the Organization Folder level:
-
Navigate to your Organization Folder.
-
Click
Configure. -
Find the
Ownerfield in the GitHub configuration section. -
Set the same value as configured in the GitHub App credential.
-
If the credential’s
Ownerfield is blank, leave the Organization Folder’sOwnerfield blank as well.
Note: If your GitHub App is only installed in a single organization, you can leave both Owner fields blank and the plugin will automatically infer the correct owner.
This issue is tracked in JENKINS-76235 (fix for the crash) and JENKINS-76236 (improved error reporting).
Tested product/plugin versions
-
CloudBees CI on traditional platforms - client controller - 2.516.3.29358
-
github-branch-source-plugin- 1834.v857721ea_74c6