无法在Artifactory中登录docker注册表

时间:2018-05-10 20:25:37

标签: docker artifactory docker-registry

我在Artifactory中有一个docker注册表设置,我正在尝试登录,但我一直收到禁止消息

执行时

docker login art.example.com

Output:
Username: xxxx
Password: xxxx
Error response from daemon: Get https://art.example.com/v2/: unknown: Forbidden

Artifactory日志显示:     20180510195825|1|REQUEST|XX.XX.XX.XX|non_authenticated_user|GET|/api/docker/v2/|HTTP/1.1|403|0

任何帮助都将不胜感激。

更新

已修复(2019-01-09): 使用以下内容更改了代理(nginx):

(...)

listen 443 ssl;

(...)

# Docker traffic
# Redirect (most) requests to /v2/* to the Docker Registry
location /v2/ {
    add_header 'Docker-Distribution-Api-Version' $docker_distribution_api_version always;
    rewrite ^/(v2)/$ /api/docker/$1;
    rewrite ^/(v2)/([^\/]*)/(.*) /api/docker/$2/$1/$3;
    proxy_set_header Host $http_host;
}

# Artifactory traffic
location / {
    rewrite ^/$ /artifactory/webapp/ redirect;
    rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
    if ( $request_uri ~ ^/artifactory/(.*)$ ) {
        proxy_pass          http://art.example.com:8081/artifactory/$1;
    }

    proxy_pass_header       Server;
    proxy_pass              http://art.example.com:8081/artifactory/;
    proxy_set_header        Host              $http_host;
    proxy_set_header        X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host/artifactory;
}

0 个答案:

没有答案
相关问题