goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.2k stars 4.77k forks source link

harbor unauthorized: unauthorized to access repository #16724

Closed zlwzlwzlw closed 2 years ago

zlwzlwzlw commented 2 years ago

harbor:2.3.5 deploy: docker-compose harbor.yml hostname: 192.168.33.92 http: port: 7002

external_url: https://mirror123.acmg.com

and use nginx for proxy (harbor -> nginx) problem: login Succeeded but when push met "unauthorized: unauthorized to access repository: library/redis, action: push: unauthorized to access repository: library/redis, action: push"

chlins commented 2 years ago

Could you provide token in request?

fanmaoyang commented 2 years ago

Encountered the same problem

phantooom commented 2 years ago

the same problem

v2.4.2 in k8s

nginx(https) -> ingress(http)-> harbor

phantooom commented 2 years ago

nginx add this config solved. proxy_set_header X-Forwarded-Proto https;

wyaopeng commented 2 years ago

unauthorized: unauthorized to access repository:

wyaopeng commented 2 years ago

you can like this ! location / { proxy_pass http://192.168.33.92:7002; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect http:// $scheme://; }

github-actions[bot] commented 2 years ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.