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:

      https://www.jenkins.io/doc/book/system-administration/security/build-authorization/

       

       

       

       

       

          [JENKINS-62326] Jenkins Gitea Plugin project builds can only be run as SYSTEM user

          Tim Baronetti created issue -
          Tim Baronetti made changes -
          Description Original: 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 <uusername>
          Running as <username>
          Querying the current revision of branch master...
          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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          New: 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 <uusername>
           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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          Tim Baronetti made changes -
          Description Original: 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 <uusername>
           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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          New: 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:
          {code:java}
          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
          {code}
          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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          Tim Baronetti made changes -
          Description Original: 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:
          {code:java}
          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
          {code}
          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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          New: 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:
          {code:java}
          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
          {code}
          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:

          [https://www.jenkins.io/doc/book/system-administration/security/build-authorization/]

           

           

           

           

           
          charly ghislain made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          charly ghislain made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          charly ghislain made changes -
          Link New: This issue is related to JENKINS-60017 [ JENKINS-60017 ]
          Lauris BH made changes -
          Released As New: https://github.com/jenkinsci/gitea-plugin/pull/30
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Lauris BH made changes -
          Lauris BH made changes -
          Remote Link New: This issue links to "#30 (Web Link)" [ 27122 ]
          Lauris BH made changes -
          Released As New: https://github.com/jenkinsci/gitea-plugin/releases/tag/gitea-1.3.0
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: