A. Ecrubit
A. Ecrubit

Reputation: 609

Gitlab Registry : Access Denied

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

Upvotes: 1

Views: 3748

Answers (1)

Arty-chan
Arty-chan

Reputation: 2998

The error message suggests an authentication error. Most likely it's:

-u gitlab-repository

The option -u expects your username as per the docs.

Upvotes: 4

Related Questions