Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behavior of ping is against Docker v2 API Spec #198

Open
jabielecki opened this issue Nov 16, 2019 · 2 comments
Open

behavior of ping is against Docker v2 API Spec #198

jabielecki opened this issue Nov 16, 2019 · 2 comments

Comments

@jabielecki
Copy link

jabielecki commented Nov 16, 2019

Per Docker v2 API Specification:

When a 200 OK or 401 Unauthorized response is returned, the “Docker-Distribution-API-Version” header should be set to “registry/2.0”. Clients may require this header value to determine if the endpoint serves this API.

So the implicit assumption is that if you only want to ping, the 401 is as good a response as 200.

However, currently reg regards 401 as a ping error.

reg version
reg:
 version     : 
 git hash    : 
 go version  : go1.13.4
 go compiler : gc
 platform    : linux/amd64


reg tags quay.io/kubernetes-ingress-controller/nginx-ingress-controller
INFO[0000] domain: quay.io                              
INFO[0000] server address: quay.io                      
Get https://quay.io/v2/: http: non-successful response (status=401 body="{\"error\": \"Invalid bearer token format\"}")


reg tags --skip-ping quay.io/kubernetes-ingress-controller/nginx-ingress-controller
INFO[0000] domain: quay.io                              
INFO[0000] server address: quay.io                      
0
0.10.0
0.10.1

Impact: when using quay.io registry (and also azure cloud registry and other less popular ones) every user needs to wildly troubleshoot until they discover they need --skip-ping option. That's confusing.

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@jabielecki
Copy link
Author

Solved in the fork https://github.com/ttys3/reg which I now regard as the maintained source-of-truth for my future work with reg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant