I'm trying to push a simple docker image on my docker registry and I get an access denied after a successful docker login
.
I created a Personnal Access Token with api
scope.
1) I log in with:
docker login -u gitlab-repository -p <token> registry.gitlab.com
I got Login Succeeded .
2) Then: docker build -t registry.gitlab.com/<username>/test-ci.
3) And finaly when I push: docker push registry.gitlab.com/<username>/test-ci
I get this error: unauthorized: HTTP Basic: Access denied
The error message suggests an authentication error. Most likely it's:
-u gitlab-repository
The option -u
expects your username as per the docs .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.