Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43996

Improve message "Could not update commit status." when credentials are readonly

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      The message "Could not update commit status..." when credentials are read only does not help to solve the issue and benefit more of Jenkins.

      Could we have an explanation, maybe a link to a FAQ page, to help user to setup credentials with permissions to update the status of the commit?

      Could not update commit status. Message: {"message":"Must authenticate to access this API.","documentation_url":"https://developer.github.com/enterprise/2.9/v3"}
      

        1. about.md
          13 kB
        2. build.log
          36 kB

          [JENKINS-43996] Improve message "Could not update commit status." when credentials are readonly

          Cyrille Le Clerc created issue -
          Cyrille Le Clerc made changes -
          Issue Type Original: Task [ 3 ] New: Improvement [ 4 ]
          Cyrille Le Clerc made changes -
          Link New: This issue is related to JENKINS-40705 [ JENKINS-40705 ]
          Kyle Leinen made changes -
          Comment [ I am also getting the same and 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 the Github Enterprise server that my company uses does not have anonymous access enabled. All access needs to be authenticated. Maybe that has something to do with this.
            
          {noformat}
          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
           {noformat} ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-1781 (Web Link)" [ 18578 ]

            Unassigned Unassigned
            cleclerc Cyrille Le Clerc
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: