• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins: 2.222.4
      Gerrit Code Review: 0.4.1

      During changes downloading, plugin expects gerrit to be in the webroot:

      Fetching origin...
      ERROR: [Tue Jun 02 11:43:27 CEST 2020] Could not update folder level actions from source 9204613c-d5d7-4bdd-979e-6588b33bacb9
      com.urswolfer.gerrit.client.rest.http.HttpStatusException: Request not successful. Message: Not Found. Status-Code: 404. Content: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
      <html><head>
      <title>404 Not Found</title>
      </head><body>
      <h1>Not Found</h1>
      <p>The requested URL /a/changes/ was not found on this server.</p>

      I read the change was fixed (https://issues.jenkins-ci.org/browse/JENKINS-50930) but doesn't seem to work in my case.

          [JENKINS-62537] Failed to download changes from gerrit

          Are you sure the SCM URL corresponds to the actual Gerrit URL? Or are you pointing to a slave repo?

          Luca Domenico Milanesio added a comment - Are you sure the SCM URL corresponds to the actual Gerrit URL? Or are you pointing to a slave repo?

          I'm not sure what do You mean by SCM URL and slave repo. I set up project accoding to instruction below:
          To build changes with pending checks, create a new Multibranch Pipeline item and select Branch Source of type Gerrit as described above. Then add the Filter by Pending Checks-behaviour to the Gerrit Branch Source. To select checkers, which should be checked for whether their checks are pending, under Query Operator either select to query pending checks by checker scheme to select a whole group of checkers or by a specific checker UUID, to only query by a specific checker. In the Query String-field enter the scheme name or checker UUID respectively.
          As project repository I set http://host.ip.address/gerrit/path/to/my/repo (setting host.ip.address and path/to/my/repo). I tried without http:// at the beginning, allowing insecure https. But the error still seems to be the same. I tried leaving the Query empty and set to status:open, but, as the endpoint /a/changes is unreachable, it shouldn't change anything.

          Krzysztof Więcław added a comment - I'm not sure what do You mean by SCM URL and slave repo. I set up project accoding to instruction below: To build changes with pending checks, create a new Multibranch Pipeline item and select Branch Source of type Gerrit as described above. Then add the Filter by Pending Checks -behaviour to the Gerrit Branch Source . To select checkers, which should be checked for whether their checks are pending, under Query Operator either select to query pending checks by checker scheme to select a whole group of checkers or by a specific checker UUID, to only query by a specific checker. In the Query String -field enter the scheme name or checker UUID respectively. As project repository I set http://host.ip.address/gerrit/path/to/my/repo (setting host.ip.address and path/to/my/repo). I tried without http:// at the beginning, allowing insecure https. But the error still seems to be the same. I tried leaving the Query empty and set to status:open, but, as the endpoint /a/changes is unreachable, it shouldn't change anything.

          I believe the problem is this:

          > As project repository I set http://host.ip.address/gerrit/path/to/my/repo

          In Gerrit you need to use the '/a/' prefix for authenticated access to repositories.

          Can you change the URL to http://host.ip.address/gerrit/a/path/to/my/repo

          and try again?

          Luca Domenico Milanesio added a comment - I believe the problem is this: > As project repository I set  http://host.ip.address/gerrit/path/to/my/repo In Gerrit you need to use the '/a/' prefix for authenticated access to repositories. Can you change the URL to  http://host.ip.address/gerrit/a/path/to/my/repo and try again?

          Yes, thank You, that resolved this problem.

          Krzysztof Więcław added a comment - Yes, thank You, that resolved this problem.

          I can turn the ticket into: give warning when the SCM URL does not include the `/a/` prefix.

          Luca Domenico Milanesio added a comment - I can turn the ticket into: give warning when the SCM URL does not include the `/a/` prefix.

          I think it would be helpful or at least worth mentioning, as I never encountered any mention about /a/ prefix before.

          Krzysztof Więcław added a comment - I think it would be helpful or at least worth mentioning, as I never encountered any mention about /a/ prefix before.

          wutus are you referring to the plugin's documentation or the Gerrit one?

          Luca Domenico Milanesio added a comment - wutus are you referring to the plugin's documentation or the Gerrit one?

          Alexander Ost added a comment -

          I just ran into the same problem. At least with Gerrit 3.4.2, the download-commands plugin provides http clone URLs without the `/a/' – and still, authentication is enforced.

          So, if a user just copies the clone URL from the Gerrit Web interface, then they will run into the problem described here. Therefore, it would be nice to produce a warning if the `/a/' is missing.

          Alexander Ost added a comment - I just ran into the same problem. At least with Gerrit 3.4.2, the download-commands plugin provides http clone URLs without the `/a/' – and still, authentication is enforced. So, if a user just copies the clone URL from the Gerrit Web interface, then they will run into the problem described here. Therefore, it would be nice to produce a warning if the `/a/' is missing.

            lucamilanesio Luca Domenico Milanesio
            wutus Krzysztof Więcław
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: