Docker login: access denied you must use a personal access token

Viewed 14142

Trying to login from docker to gitlab using the command:

sudo docker login registry.gitlab.com?private_token=XXX

But I still have the following error message:

Error response from daemon: Get https://registry.gitlab.com/v2/: unauthorized: HTTP Basic: Access denied\nYou must use a personal access token with 'api' scope for Git over HTTP.\nYou can generate one at https://gitlab.com/-/profile/personal_access_tokens

The token has the right access I doubled checked... I am rather new to docker, any hint/help? thanks!

2 Answers

The correct command line (that works in my case at least) was:

docker login registry.example.com -u <your_username> -p <your_personal_access_token>
Related