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

Gitea PR build fails if Jenkins user is not admin of the repo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gitea-plugin
    • None

      If the user that Jenkins uses to authenticate to Gitea is not admin of the repository, the Jenkins job fails when building pull request. It seem to fetch collaborators which requires admin priviliges but I don't understand why that is needed.

      [Gitea] Notifying pull request build status: FAILURE There was a failure building this commit
      [Gitea] Notified
      org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 403/Forbidden
      	at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getList(DefaultGiteaConnection.java:1013)
      	at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchCollaborators(DefaultGiteaConnection.java:353)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.getTrustedRevision(GiteaSCMSource.java:477)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:99)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

            Unassigned Unassigned
            merle_noir David Svantesson
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: