jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-45731] Unable to PR check status back to Github Enterprise with org-owner account

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

Description

I have verified that my user has full ownership of the org and the tokens I am using has every available checkbox checked.  I don't know how I would be seeing this with a user account with all that authorized capability. I do know that my company's Github Enterprise server does not have anonymous access enabled and all access needs to be authenticated. Maybe that has something to do with this.

I do have a folder created on a different Jenkins system using the old Github Organizations Folder plugin, using the same user and running the same repo/pipeline.  It does not show this error and updates the pull request check status appropriately.

 

```
Pull request #5 updated
16:43:33 Connecting to [https://github.mycompany.com/api/v3] using testuser/****** (Github username and password)
Checking out git git@​github.mycompany.com:skunkworks/foobar.git to read Jenkinsfile
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@​github.mycompany.com:skunkworks/foobar.git # timeout=10
Fetching without tags
Fetching upstream changes from git@​github.mycompany.com:skunkworks/foobar.git
> git --version # timeout=10
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@​github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab into PR head commit 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git config core.sparsecheckout # timeout=10
> git checkout -f 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git merge 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab # timeout=10
> git rev-parse HEAD^

\{commit} # timeout=10
Merge succeeded, producing 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59
Checking out Revision 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59 (PR-5)
Commit message: "Merge commit '0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab' into HEAD"
> git config core.sparsecheckout # timeout=10
> git checkout -f 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59
> git rev-list ae7ddb86586fb5347d0b9db563db4fd093d2ca14 # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Could not update commit status. Message: \{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}
[Pipeline] node
Running on master in /var/jenkins_home/jobs/skunkworks/jobs/foobar/branches/PR-5/workspace
[Pipeline] \{
[Pipeline] stage
[Pipeline] \{ (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository git@​github.mycompany.com:skunkworks/foobar.git
> git init /var/jenkins_home/jobs/skunkworks/jobs/foobar/branches/PR-5/workspace # timeout=10
Fetching upstream changes from git@​github.mycompany.com:skunkworks/foobar.git
> git --version # timeout=10
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@​github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
> git config remote.origin.url git@​github.mycompany.com:skunkworks/foobar.git # timeout=10
> git config --add remote.origin.fetch +refs/pull/5/head:refs/remotes/origin/PR-5 # timeout=10
> git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10
> git config remote.origin.url git@​github.mycompany.com:skunkworks/foobar.git # timeout=10
Fetching without tags
Fetching upstream changes from git@​github.mycompany.com:skunkworks/foobar.git
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@​github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab into PR head commit 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git config core.sparsecheckout # timeout=10
> git checkout -f 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git merge 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab # timeout=10
> git rev-parse HEAD^\{commit}

# timeout=10
Merge succeeded, producing 0dec6261bcf8200de83e27e9e63e40044e867fec
Checking out Revision 0dec6261bcf8200de83e27e9e63e40044e867fec (PR-5)
Commit message: "Merge commit '0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab' into HEAD"
> git config core.sparsecheckout # timeout=10
> git checkout -f 0dec6261bcf8200de83e27e9e63e40044e867fec
> git rev-list ae7ddb86586fb5347d0b9db563db4fd093d2ca14 # timeout=10
First time build. Skipping changelog.
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Could not update commit status. Message:

\{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}

[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline]

\{ (Test) [Pipeline] echo Hello world [Pipeline] }

[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Could not update commit status. Message:

\{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}

Finished: SUCCESS
 
```

---
Originally reported by kmleinen, imported from: Unable to PR check status back to Github Enterprise with org-owner account


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I have verified that my user has full ownership of the org and the tokens I am using has every available checkbox checked.  I don't know how I would be seeing this with a user account with all that authorized capability. I do know that my company's Github Enterprise server does not have anonymous access enabled and all access needs to be authenticated. Maybe that has something to do with this.

I do have a folder created on a different Jenkins system using the old Github Organizations Folder plugin, using the same user and running the same repo/pipeline.  It does not show this error and updates the pull request check status appropriately.
 



Pull request #5 updated

16:43:33 Connecting to [https://github.mycompany.com/api/v3] using testuser/****** (Github username and password)
Checking out git git@github.mycompany.com:skunkworks/foobar.git to read Jenkinsfile
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.mycompany.com:skunkworks/foobar.git # timeout=10
Fetching without tags
Fetching upstream changes from git@github.mycompany.com:skunkworks/foobar.git
> git --version # timeout=10
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab into PR head commit 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git config core.sparsecheckout # timeout=10
> git checkout -f 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git merge 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab # timeout=10
> git rev-parse HEAD^

\{commit} # timeout=10
Merge succeeded, producing 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59
Checking out Revision 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59 (PR-5)
Commit message: "Merge commit '0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab' into HEAD"
> git config core.sparsecheckout # timeout=10
> git checkout -f 75f806b5c4e3d0ed4523a4224bb8ecfaf8659b59
> git rev-list ae7ddb86586fb5347d0b9db563db4fd093d2ca14 # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Could not update commit status. Message: \{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}
[Pipeline] node
Running on master in /var/jenkins_home/jobs/skunkworks/jobs/foobar/branches/PR-5/workspace
[Pipeline] \{
[Pipeline] stage
[Pipeline] \{ (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository git@github.mycompany.com:skunkworks/foobar.git
> git init /var/jenkins_home/jobs/skunkworks/jobs/foobar/branches/PR-5/workspace # timeout=10
Fetching upstream changes from git@github.mycompany.com:skunkworks/foobar.git
> git --version # timeout=10
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
> git config remote.origin.url git@github.mycompany.com:skunkworks/foobar.git # timeout=10
> git config --add remote.origin.fetch +refs/pull/5/head:refs/remotes/origin/PR-5 # timeout=10
> git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10
> git config remote.origin.url git@github.mycompany.com:skunkworks/foobar.git # timeout=10
Fetching without tags
Fetching upstream changes from git@github.mycompany.com:skunkworks/foobar.git
using GIT_SSH to set credentials testuser Github ssh key
> git fetch --no-tags --progress git@github.mycompany.com:skunkworks/foobar.git +refs/pull/5/head:refs/remotes/origin/PR-5 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab into PR head commit 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git config core.sparsecheckout # timeout=10
> git checkout -f 958549ea0951428e9e8fb1ca6575694a5e34ecd1
> git merge 0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab # timeout=10
> git rev-parse HEAD^\{commit}

# timeout=10
Merge succeeded, producing 0dec6261bcf8200de83e27e9e63e40044e867fec
Checking out Revision 0dec6261bcf8200de83e27e9e63e40044e867fec (PR-5)
Commit message: "Merge commit '0dbe201d15dafcbe0dd88cd3af21d12e2cf91eab' into HEAD"
> git config core.sparsecheckout # timeout=10
> git checkout -f 0dec6261bcf8200de83e27e9e63e40044e867fec
> git rev-list ae7ddb86586fb5347d0b9db563db4fd093d2ca14 # timeout=10
First time build. Skipping changelog.
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Could not update commit status. Message:

\{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}

[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline]

\{ (Test) [Pipeline] echo Hello world [Pipeline] }

[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Could not update commit status. Message:

\{"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}

Finished: SUCCESS
 


environment

```
Jenksin 2.46.1

- Github Branch Source 2.0.4

Github Enterprise 2.9 w/ no anonymous access
```

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.