Reputation: 5808
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
Upvotes: 4
Views: 3486
Reputation: 1675
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
Upvotes: 0
Reputation: 5808
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
Upvotes: 7