将图像推送到docker artifactory时出现以下错误:
v1
:
Error: Status 405 trying to push repository abc-docker-local: "{\n \"errors\" : [ {\n \"status\" : 405,\n \"message\" : \"Method Not Allowed\"\n } ]\n}"
我使用的是nginx。我的配置文件如下所示:
server_name localserver;
rewrite ^ remoteserver/artifactory/api/docker/abc-docker-local/v1 redirect;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
location / {
proxy_read_timeout 900;
proxy_pass_header Server;
proxy_cookie_path ~*^/.* /;
proxy_pass http://remoteserver:9081/artifactory/api/docker/abc-docker-local/v1;
proxy_set_header X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
在Artifactory中,我将回购设置为v1
。我还使用v2
进行了测试,但没有返回任何终点。 v2的确切错误是:
Index response didn't contain any endpoints
提前致谢