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

Jenkins Gitea Plugin project builds can only be run as SYSTEM user


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • gitea-plugin
    • Jenkins ver. 2.222.3
      Gitea Plugin 1.2.0
      Firefox 76.0.1 (64-bit)
      OpenJDK Runtime Environment (build 1.8.0_242-b08)

      Running project builds as User who Triggered Build fail. Builds can only be run as SYSTEM. Appears to be a failure to authenticate the jenkins user in the Gitea repo:

      Started by user <username>
      Running as <username>
      Querying the current revision of branch master...
      org.jenkinsci.plugin.gitea.client.api.GiteaHttpStatusException: HTTP 404/Not Found
        at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.getObject(DefaultGiteaConnection.java:870)
        at org.jenkinsci.plugin.gitea.client.impl.DefaultGiteaConnection.fetchBranch(DefaultGiteaConnection.java:271)
        at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:187)
        at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
        at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
        at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
        at hudson.model.ResourceController.execute(ResourceController.java:97)
        at hudson.model.Executor.run(Executor.java:428)
      Finished: FAILURE

      However, when first creating the Gitea organisation in Jenkins, the scan of the organization works correctly and all branches in the repo are correctly built, even if the Gitea organization is created as User who Triggered Build. The problem only occurs when creating individual builds for a selected branch.

      Creating builds as SYSTEM is not secure as noted here:







            Unassigned Unassigned
            tbaro Tim Baronetti
            2 Vote for this issue
            4 Start watching this issue