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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: gitea-plugin
    • Labels:
    • Environment:
      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)
    • Similar Issues:

      Description

      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/

       

       

       

       

       

        Attachments

          Issue Links

            Activity

            tbaro Tim Baronetti created issue -
            tbaro Tim Baronetti made changes -
            Field Original Value New Value
            Description 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/]

             

             

             

             

             
            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/]

             

             

             

             

             
            tbaro Tim Baronetti made changes -
            Description 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/]

             

             

             

             

             
            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/]

             

             

             

             

             
            tbaro Tim Baronetti made changes -
            Description 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/]

             

             

             

             

             
            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/]

             

             

             

             

             
            cghislai charly ghislain made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]
            cghislai charly ghislain made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            cghislai charly ghislain made changes -
            Link This issue is related to JENKINS-60017 [ JENKINS-60017 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tbaro Tim Baronetti
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: