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

Intermittent unauthorized problems with Docker push

    XMLWordPrintable

Details

    Description

      We use a JSON token from our service account in Google Cloud Platform. This is used at the registry credential for our push to the GCP artifact registry. This works sometimes, but randomly and sometimes consistently we get unauthorized errors. I have spoken with Google support about this and they stated that they are not properly receiving the credentials with the push request.

      Step 1/9 : FROM openjdk:8-alpine
      8-alpine: Pulling from library/openjdk
      Digest: sha256:94792824df2df33402f201713f932b58cb9de94a0cd524164a0f2283343547b3
      Status: Image is up to date for openjdk:8-alpine
      ---> a3562aa0b991
      Step 2/9 : RUN apk --no-cache add msttcorefonts-installer fontconfig && update-ms-fonts && fc-cache -f
      ---> Using cache
      ---> e8478928b286
      Step 3/9 : EXPOSE 8080
      ---> Using cache
      ---> d4fa7d19a7f7
      Step 4/9 : ARG SPRING_PROFILE=gke-demo01
      ---> Using cache
      ---> 45a8674b5a3a
      Step 5/9 : ENV SPRING_PROFILE=${SPRING_PROFILE}
      ---> Using cache
      ---> 7dcfb9ea872a
      Step 6/9 : RUN echo ${SPRING_PROFILE}
      ---> Using cache
      ---> bded77b51369
      Step 7/9 : RUN mkdir /app
      ---> Using cache
      ---> fd73f138be7a
      Step 8/9 : COPY /build/libs/*.jar /app/reports.jar
      ---> Using cache
      ---> 173274f1d3f2
      Step 9/9 : ENTRYPOINT ["java","-Dspring.profiles.active=${SPRING_PROFILE}","-jar","/app/reports.jar"]
      ---> Using cache
      ---> 051b8f400efd
      Successfully built 051b8f400efd
      Successfully tagged us-central1-docker.pkg.dev/xxx/reports-app/reports-app-demo01:latest
      [Reports App] $ docker inspect 051b8f400efd
      WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release
      [Reports App] $ docker push us-central1-docker.pkg.dev/xxx/reports-app/reports-app-demo01
      WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release
      Using default tag: latest
      The push refers to repository [us-central1-docker.pkg.dev/xxx/reports-app/reports-app-demo01]
      aac09c0c4fbb: Preparing
      37025e3505dd: Preparing
      08a9a5d1ee3e: Preparing
      ceaf9e1ebef5: Preparing
      9b9b7f3d56a0: Preparing
      f1b5933fe4b5: Preparing
      f1b5933fe4b5: Waiting
      unauthorized: failed authentication
      failed build com.cloudbees.dockerpublish.DockerBuilder@3b88483c SUCCESS
      Finished: FAILURE

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            csanchez Carlos Sanchez
            jrichmond4 Jeff Richmond
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: