Reto Höhener
Reto Höhener

Reputation: 5808

Harbor robot account: Error response from daemon: unauthorized: authentication required

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

Answers (2)

Nikolay Baranenko
Nikolay Baranenko

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

Reto Höhener
Reto Höhener

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

Related Questions