Docker login succeed but Docker push giving error "unauthorized: HTTP Basic: Access denied"
If you are getting the following error while pushing docker image to gitlab registry then try to check the ".crt" file and ".key" file in "gitlab.rb".
Error while pushing image:
unauthorized: HTTP Basic: Access denied
Error in Gitlab (/var/log/gitlab/registry/current)
level=warning msg="error authorizing context: authorization token required" environment=production go.version=go1.8.1
check if you have the following things correctly in /etc/gitlab/gitlab.rb file
# Change the external_url to the address your users will type in their browser external_url 'https://myrepo.xyz.com' nginx['redirect_http_to_https'] = true registry_external_url 'https://registry.xyz.com' registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/registry.xyz.com.crt" registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/registry.xyz.com.key"
Make sure the .crt file and .key file exists on the path specified here in gitlab.rb if not make the changes and restart gitlab with - "sudo gitlab-ctl restart"
0 comments:
Post a Comment