skip to Main Content

I’m always getting:

Error response from daemon: Get "https://myregistry.example.com/v2/": unauthorized: authentication required

When trying to login with:

docker login --username robot$myproject+myrobotaccount myregistry.example.com

2

Answers


  1. Chosen as BEST ANSWER

    Quote the robot username on Linux:

    docker login --username 'robot$myproject+myrobotaccount' myregistry.example.com
    

    But, do NOT quote the username on Windows

    docker login --username robot$myproject+myrobotaccount myregistry.example.com
    

  2. don`n forget about special character – $

    export DOCKER_USERNAME=robot$myproject+myrobotaccount
    export DOCKER_PASSWORD=sdfsdfsdfsdfsdfsdfsdfsdfsdfW
    export CI_REGISTRY=myregistry.example.com
    
    echo "$DOCKER_PASSWORD" | docker login "$CI_REGISTRY" --username $DOCKER_USERNAME --password-stdin
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search