{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18569","labels_url":"https://api.github.com/repos/docker/docker/issues/18569/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18569/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18569/events","html_url":"https://github.com/docker/docker/issues/18569","id":121489632,"number":18569,"title":"Docker client does not handle 401 Unauthorized response codes from registry correctly","user":{"login":"hjacobs","id":510328,"avatar_url":"https://avatars.githubusercontent.com/u/510328?v=3","gravatar_id":"","url":"https://api.github.com/users/hjacobs","html_url":"https://github.com/hjacobs","followers_url":"https://api.github.com/users/hjacobs/followers","following_url":"https://api.github.com/users/hjacobs/following{/other_user}","gists_url":"https://api.github.com/users/hjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/hjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjacobs/subscriptions","organizations_url":"https://api.github.com/users/hjacobs/orgs","repos_url":"https://api.github.com/users/hjacobs/repos","events_url":"https://api.github.com/users/hjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/hjacobs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/distribution","name":"group/distribution","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-12-10T13:53:13Z","updated_at":"2015-12-15T13:18:35Z","closed_at":null,"body":"Docker (1.9.1) only checks for 401 HTTP status code on `GET /v2/` but it will not attempt authentication on later 401 status response codes. My use case: our registry needs to allow unauthenticated pulls (therefore will return 200 on `GET /v2/`), but it requires authentication on \"push\".\r\n\r\nDocker client version: 1.9.1\r\n\r\nUsed registry: https://github.com/zalando-stups/pierone\r\n\r\nDocker client will print \"\\<nil\\>\" on the console instead of attempting authentication (as it should).\r\n\r\n![docker-why](https://cloud.githubusercontent.com/assets/510328/11716909/51d2e0b8-9f4d-11e5-9cce-9c1418e908f1.png)"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/164760798","html_url":"https://github.com/docker/docker/issues/18569#issuecomment-164760798","issue_url":"https://api.github.com/repos/docker/docker/issues/18569","id":164760798,"user":{"login":"mickep76","id":1099169,"avatar_url":"https://avatars.githubusercontent.com/u/1099169?v=3","gravatar_id":"","url":"https://api.github.com/users/mickep76","html_url":"https://github.com/mickep76","followers_url":"https://api.github.com/users/mickep76/followers","following_url":"https://api.github.com/users/mickep76/following{/other_user}","gists_url":"https://api.github.com/users/mickep76/gists{/gist_id}","starred_url":"https://api.github.com/users/mickep76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickep76/subscriptions","organizations_url":"https://api.github.com/users/mickep76/orgs","repos_url":"https://api.github.com/users/mickep76/repos","events_url":"https://api.github.com/users/mickep76/events{/privacy}","received_events_url":"https://api.github.com/users/mickep76/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T13:18:35Z","updated_at":"2015-12-15T13:18:35Z","body":"https://github.com/docker/distribution/issues/1230"}}