Help Center/ ServiceStage/ FAQs/ Software Center/ What If the Docker Client Fails to Push Images?
Updated on 2023-07-14 GMT+08:00

What If the Docker Client Fails to Push Images?

Symptom

A tenant or user logs in to the Docker client and runs the following command to push an image:

docker push 10.125.54.133:20202/test1/busybox:latest

  • 10.125.54.133:20202 indicates the IP address and port number of the repository to which the tenant or user is to push an image.
  • test1 indicates a namespace.

However, the image fails to be pushed, and the following information is displayed on the Docker client:

unauthorized: authentication required

Solution

  1. Use a correct AK/SK to log in to the Docker client.
  2. Push an image to a namespace on which the current tenant or user has the operation permissions, or replace the namespace with a new one.

    • Run the following command to push an image to a namespace on which the current tenant or user has the operation permissions:

      docker push 10.125.54.133:20202/test2/busybox:latest

      • 10.125.54.133:20202 indicates the IP address and port number of the repository to which the tenant or user is to push an image.
      • test2 indicates the namespace on which the tenant or user has the operation permissions.
    • Run the following command to replace the namespace with a new one:

      docker push 10.125.54.133:20202/test3/busybox:latest

      • 10.125.54.133:20202 indicates the IP address and port number of the repository to which the tenant or user is to push an image.
      • test3 indicates a new namespace.

  3. After the image is pushed, the following information is displayed:

    The push refers to a repository [10.125.54.133:20202/test2/busybox]
    6a749002dd6a: Pushed
    latest: digest: sha256:ecb3f3e96e003af6e02f0f47ac4d25a3b0585db54de0a82bb070f8cb78a79bc7 size: 527

    If an exception occurs, contact technical support.