jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-76124] Github branch source plugin JWT errors

Open
#1,478 2 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

Hi,

The new breaking change upgrade broken the Github Branch Source plugin, It is no more able to connect Github with GithubApp private keys and throws below JWT error.

The private key is working fine as I have tested in my local and it can access Github API and clone, also have enough permissions. 

 

The plugin was working before the breaking changes.

When I test connection on credentials window I get this error 

org.kohsuke.github.HttpException: {"message":"A JSON web token could not be decoded","documentation_url":"https://docs.github.com/rest","status":"401"}

at PluginClassLoader for github-api//org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:88)

 

Also when I clone the repo it throws this error

ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: hudson.remoting.ProxyException: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID 1122 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:157)

 

---
Originally reported by chiranjeevi_patel, imported from: Github branch source plugin JWT errors


  • status: Open
  • priority: Critical
  • component(s): github-branch-source-plugin
  • label(s): github, githubbranchsource, plugins
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

Hi,

The new breaking change upgrade broken the Github Branch Source plugin, It is no more able to connect Github with GithubApp private keys and throws below JWT error.

The private key is working fine as I have tested in my local and it can access Github API and clone, also have enough permissions. 

 

The plugin was working before the breaking changes.

When I test connection on credentials window I get this error 

org.kohsuke.github.HttpException: {"message":"A JSON web token could not be decoded","documentation_url":"https://docs.github.com/rest","status":"401"}
at PluginClassLoader for github-api//org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:88)

 

Also when I clone the repo it throws this error

ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: hudson.remoting.ProxyException: java.lang.IllegalArgumentException: Couldn't authenticate with GitHub app ID 1122 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:157)

 

4 attachments

- [image-2025-09-17-11-45-29-803.png](https://issues.jenkins.io/secure/attachment/64907/image-2025-09-17-11-45-29-803.png)
> ![image-2025-09-17-11-45-29-803.png](https://issues.jenkins.io/secure/attachment/64907/image-2025-09-17-11-45-29-803.png)
- [image-2025-09-25-12-20-48-425.png](https://issues.jenkins.io/secure/attachment/64933/image-2025-09-25-12-20-48-425.png)
> ![image-2025-09-25-12-20-48-425.png](https://issues.jenkins.io/secure/attachment/64933/image-2025-09-25-12-20-48-425.png)
- [image-2025-09-25-12-23-48-659.png](https://issues.jenkins.io/secure/attachment/64934/image-2025-09-25-12-23-48-659.png)
> ![image-2025-09-25-12-23-48-659.png](https://issues.jenkins.io/secure/attachment/64934/image-2025-09-25-12-23-48-659.png)
- [image-2025-09-25-12-25-58-029.png](https://issues.jenkins.io/secure/attachment/64935/image-2025-09-25-12-25-58-029.png)
> ![image-2025-09-25-12-25-58-029.png](https://issues.jenkins.io/secure/attachment/64935/image-2025-09-25-12-25-58-029.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.