3

I’m trying to push to harbor registry 2.2. It works with ssl and the storage is on locally mounted NFS share. The error I get is: unauthorized to access repository: test/flask, action: push: unauthorized to access repository: test/flask, action push.

I tried to push with the admin user to project that I’ve created it with.

I tried to change the permission of the nfs share and it didn’t work.

The registry is on compose and not on Kubernetes.

itaiman5
  • 41
  • 1
  • 1
  • 2
  • Did you manage to solve this problem? I have exactly the same. No matter what I try, I cannot get it to work. – Joerg Nov 19 '20 at 14:11

4 Answers4

5

Had the same inexplicable issue, just started happening one day after several months with no issues. Required me to explicitly logout of Harbor registry and then login.

  1. docker logout registry.example.com
  2. docker login registry.example.com

After this sequence, the "unauthorized to access" went away, and pushes began working again.

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
Kevin Baroni
  • 51
  • 1
  • 3
1

I had the similar problem and the solution was docker login registry.example.com .

Sim
  • 382
  • 2
  • 13
1

If anybody here, my solution is remove sudo from command if exists.

sudo docker pull --> docker pull and try

derv-dice
  • 60
  • 1
  • 6
0

I had the same issue. In my case, the problem was that the username and password that were used in the GitLab pipeline were protected. This means that they were only shared with pipelines from a protected branch like master for example. Since I was testing my changes in the pipeline in a feature branch, all I had to do was to go to variable settings and uncheck the protected flag for harbor user and password so it can be shared with the pipelines that were running from feature branches.