• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • jenkins:1.642.1 (master only) within a Docker 1.9.1 container
      Google Container Registry Auth Plugin:0.3
      Google OAuth Credentials plugin:0.4

      I tried using both JSON and p12 flavours but both result in the following failure:

      [workspace] $ docker tag --force=true 2815f91921d7 eu.gcr.io/project-id/reporting-server:latest
      [workspace] $ docker inspect 2815f91921d7
      [workspace] $ docker push eu.gcr.io/project-id/reporting-server:12
      The push refers to a repository [eu.gcr.io/project-id/reporting-server] (len: 1)
      2815f91921d7: Preparing
      Post https://eu.gcr.io/v2/project-id/reporting-server/blobs/uploads/: token auth attempt for registry: https://eu.gcr.io/v2/token?account=_token&scope=repository%3Aproject-id%2Freporting-server%3Apush%2Cpull&service=eu.gcr.io request failed with status: 403 Forbidden
      Build step 'Docker Build and Publish' marked build as failure

      Sadly it is not clear precisely what has failed.

      The user that created the token successfully pushed the image manually using the gcloud tool so there was no permission problem at that level.

          [JENKINS-32700] 403 Forbidden

          Wei Z added a comment -

          Sorry for late reply. I have been on vacation.

          Are you expecting this plugin to work with docker command directly?
          Or are you also using it with a compatible plugin like "Docker Build Step Plugin" or "CloudBees Docker Custom Build Environment Plugin"?

          This plugin is not implemented for use with docker command directly.

          Wei Z added a comment - Sorry for late reply. I have been on vacation. Are you expecting this plugin to work with docker command directly? Or are you also using it with a compatible plugin like "Docker Build Step Plugin" or "CloudBees Docker Custom Build Environment Plugin"? This plugin is not implemented for use with docker command directly.

          James Green added a comment -

          This was with one of those two build plugins, choosing the credentials in the drop-down that were provided via your plugin. We were not using the docker command directly.

          James Green added a comment - This was with one of those two build plugins, choosing the credentials in the drop-down that were provided via your plugin. We were not using the docker command directly.

          Robert Dolca added a comment -

          I am having the same issue. The first push fails. If I push manually afterwards the plugins works as intended.

          Robert Dolca added a comment - I am having the same issue. The first push fails. If I push manually afterwards the plugins works as intended.

          Robert Dolca added a comment -

          After experimenting with it for a while my conclusion is that it sometimes works but I can't firegure out when.

          Robert Dolca added a comment - After experimenting with it for a while my conclusion is that it sometimes works but I can't firegure out when.

          Josh Perry added a comment -

          We've done an internal build updating the docker-commons dep to v1.8 and it seems to fix this issue. The release version of this plugin uses v1.0.

          Josh Perry added a comment - We've done an internal build updating the docker-commons dep to v1.8 and it seems to fix this issue. The release version of this plugin uses v1.0.

            wzheng2310 Wei Z
            jmkgreen James Green
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: