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

Creating pipeline results in "Not Found" on saving pipeline

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Windows Server 2016 Standard x64
      JDK 1.8.0_131
      Jenkins 2.67 w/no container installed via Windows installer
      Chrome 59.0.3071.115
    • Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2, Blue Ocean 1.3, Blue Ocean - Candidates

      Problem
      Pipeline creation process offers to create Pipelines for repositories where the user does not have write access to the repository.

      This results in a "Not found" error on save, as Github will pretend a resources is not found when it is actually forbidden to access it.

      It is unknown what Bitbucket will do in this case but we need to investigate in order to make them both consistent.

      Scope

      • This ticket should take into account both Bitbucket and Github based pipeline creation flows.
      • When editing a pipeline, we need to validate on save that the user can edit the pipeline before attempting to upload content.
      • In the completed step of the pipeline flow, we need to show an error step with the message "You do not have push access to $ower/$repository. Jenkins requires push access to upload a <i>Jenkinsfile</i> to your repository."
        • No "create" button for this scenario

      Original request
      Tried following simple tutorial at https://www.cloudbees.com/blog/getting-started-blue-oceans-visual-pipeline-editor and am unable to save even the very first minimalist pipeline example. Error message "Error   Not Found" received trying to save committing to both master branch and new branch.

          [JENKINS-45253] Creating pipeline results in "Not Found" on saving pipeline

          All plugins are up to date.

           

          HAR file uploaded with cookie information stripped.

          Michael Gressman added a comment - All plugins are up to date.   HAR file uploaded with cookie information stripped.

          James Dumay added a comment -

          mgressman what are the properties of the repository? Was it a private repository on a Github organisation or your own account?

          James Dumay added a comment - mgressman what are the properties of the repository? Was it a private repository on a Github organisation or your own account?

          James Dumay added a comment -

          mgressman I added some extra logging information to a patched version of 1.1.4

          Could you try to:

          1. Upgrade to Blue Ocean 1.1.4
          2. Go to the plugin manager
          3. Upload blueocean-github-pipeline-1.1.4.jar
          4. Restart Jenkins
          5. Try to reproduce the error and capture HAR file.

          James Dumay added a comment - mgressman I added some extra logging information to a patched version of 1.1.4 Could you try to: Upgrade to Blue Ocean 1.1.4 Go to the plugin manager Upload blueocean-github-pipeline-1.1.4.jar Restart Jenkins Try to reproduce the error and capture HAR file.

          James Dumay added a comment - - edited

          mgressman borremosch I was able to reproduce this issue. In both of your cases, you are trying to create a Pipeline for a repository you do not have permission on Github to push to. Jenkins requires push privileges to upload the Jenkinsfile describing your Pipeline to the repository.

          We will be adding some additional validation here to make this clear.

          Thanks again for your help!

          James Dumay added a comment - - edited mgressman borremosch I was able to reproduce this issue. In both of your cases, you are trying to create a Pipeline for a repository you do not have permission on Github to push to. Jenkins requires push privileges to upload the Jenkinsfile describing your Pipeline to the repository. We will be adding some additional validation here to make this clear. Thanks again for your help!

          Borre Mosch added a comment -

          jamesdumay thanks, by changing the permissions on the GitHub user I got it to work!

          Borre Mosch added a comment - jamesdumay thanks, by changing the permissions on the GitHub user I got it to work!

          James Dumay added a comment -

          That's great to hear

          James Dumay added a comment - That's great to hear

          Michael Gressman added a comment - - edited

          I am not so sure that is true in my case. The repo is a private repo of an organization of which I am the owner and I already have a Jenkins pipeline (not Blue Ocean) building against that repo. I just wanted to start using Blue Ocean in place of editing the Jenkinsfile directly.

          I will double check permissions.

          Michael Gressman added a comment - - edited I am not so sure that is true in my case. The repo is a private repo of an organization of which I am the owner and I already have a Jenkins pipeline (not Blue Ocean) building against that repo. I just wanted to start using Blue Ocean in place of editing the Jenkinsfile directly. I will double check permissions.

          James Dumay added a comment -

          mgressman I checked the data coming back from Github using the HAR file you have sent and Github reported that you did not have push access to the repository in question.

          James Dumay added a comment - mgressman I checked the data coming back from Github using the HAR file you have sent and Github reported that you did not have push access to the repository in question.

          James Dumay added a comment -

          kzantow very small tweak to the creation flow. Can wait for a bit.

          James Dumay added a comment - kzantow very small tweak to the creation flow. Can wait for a bit.

          Keith Zantow added a comment -

          We need to modify BitBucket flows to validate push access and verify GitHub flows validate push access. Git flow currently validates push access when attempting to edit the Jenkinsfile, see that as a reference.

          Keith Zantow added a comment - We need to modify BitBucket flows to validate push access and verify GitHub flows validate push access. Git flow currently validates push access when attempting to edit the Jenkinsfile, see that as a reference.

            Unassigned Unassigned
            mgressman Michael Gressman
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: