{"action":"created","issue":{"url":"https://api.github.com/repos/ekristen/docker-index/issues/31","labels_url":"https://api.github.com/repos/ekristen/docker-index/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ekristen/docker-index/issues/31/comments","events_url":"https://api.github.com/repos/ekristen/docker-index/issues/31/events","html_url":"https://github.com/ekristen/docker-index/issues/31","id":63974351,"number":31,"title":"401 'Requires authorization' error from registry on push","user":{"login":"rikkuness","id":3525311,"avatar_url":"https://avatars.githubusercontent.com/u/3525311?v=3","gravatar_id":"","url":"https://api.github.com/users/rikkuness","html_url":"https://github.com/rikkuness","followers_url":"https://api.github.com/users/rikkuness/followers","following_url":"https://api.github.com/users/rikkuness/following{/other_user}","gists_url":"https://api.github.com/users/rikkuness/gists{/gist_id}","starred_url":"https://api.github.com/users/rikkuness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rikkuness/subscriptions","organizations_url":"https://api.github.com/users/rikkuness/orgs","repos_url":"https://api.github.com/users/rikkuness/repos","events_url":"https://api.github.com/users/rikkuness/events{/privacy}","received_events_url":"https://api.github.com/users/rikkuness/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ekristen/docker-index/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/ekristen/docker-index/labels/unable%20to%20reproduce","name":"unable to reproduce","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"ekristen","id":48329,"avatar_url":"https://avatars.githubusercontent.com/u/48329?v=3","gravatar_id":"","url":"https://api.github.com/users/ekristen","html_url":"https://github.com/ekristen","followers_url":"https://api.github.com/users/ekristen/followers","following_url":"https://api.github.com/users/ekristen/following{/other_user}","gists_url":"https://api.github.com/users/ekristen/gists{/gist_id}","starred_url":"https://api.github.com/users/ekristen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekristen/subscriptions","organizations_url":"https://api.github.com/users/ekristen/orgs","repos_url":"https://api.github.com/users/ekristen/repos","events_url":"https://api.github.com/users/ekristen/events{/privacy}","received_events_url":"https://api.github.com/users/ekristen/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-03-24T11:38:49Z","updated_at":"2015-04-13T09:47:24Z","closed_at":null,"body":"From what I can gather the issue is down to the 'Authorization' request header and with the registry logging in debug mode I see the error `check_token: Invalid token format`, looking at the registry code that's thrown as follows:\r\n```python\r\ndef _parse_auth_header():\r\n    auth = flask.request.headers.get('authorization', '')\r\n    if auth.split(' ')[0].lower() != 'token':\r\n        logger.debug('check_token: Invalid token format')\r\n```\r\nLooking at the same request in the index logs the authorization header is still showing Basic auth, I assume the registry is expecting `authorization: token <base64>` and instead it is getting `authorization: Basic <base64>`?\r\n\r\nThe setup is using the nginx reverse proxy and authentication succeeds and authorization appears to work to a degree, attempting to push to a namespace without any permissions indeed returns `\"access denied\"` as expected, I only get the `\"Requires authorization\"` error when pushing to a namespace with write permissions for the logged in user."},"comment":{"url":"https://api.github.com/repos/ekristen/docker-index/issues/comments/92294486","html_url":"https://github.com/ekristen/docker-index/issues/31#issuecomment-92294486","issue_url":"https://api.github.com/repos/ekristen/docker-index/issues/31","id":92294486,"user":{"login":"strima","id":5287126,"avatar_url":"https://avatars.githubusercontent.com/u/5287126?v=3","gravatar_id":"","url":"https://api.github.com/users/strima","html_url":"https://github.com/strima","followers_url":"https://api.github.com/users/strima/followers","following_url":"https://api.github.com/users/strima/following{/other_user}","gists_url":"https://api.github.com/users/strima/gists{/gist_id}","starred_url":"https://api.github.com/users/strima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strima/subscriptions","organizations_url":"https://api.github.com/users/strima/orgs","repos_url":"https://api.github.com/users/strima/repos","events_url":"https://api.github.com/users/strima/events{/privacy}","received_events_url":"https://api.github.com/users/strima/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T09:47:24Z","updated_at":"2015-04-13T09:47:24Z","body":"@ekristen - well you're right - so the problem (at least for me) was then to use ekristen/docker-index:1.4.0-rc1 (as proposed in the install documentation) - because in there neither in config/default.js nor in config/docker.js is registry.porotocol defined ;)"}}