{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/5","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/5/comments","events_url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/5/events","html_url":"https://github.com/cloudfoundry-incubator/docker_app_lifecycle/issues/5","id":106548582,"number":5,"title":"Is private registry protected with credentials supported? ","user":{"login":"libnux","id":4498974,"avatar_url":"https://avatars.githubusercontent.com/u/4498974?v=3","gravatar_id":"","url":"https://api.github.com/users/libnux","html_url":"https://github.com/libnux","followers_url":"https://api.github.com/users/libnux/followers","following_url":"https://api.github.com/users/libnux/following{/other_user}","gists_url":"https://api.github.com/users/libnux/gists{/gist_id}","starred_url":"https://api.github.com/users/libnux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libnux/subscriptions","organizations_url":"https://api.github.com/users/libnux/orgs","repos_url":"https://api.github.com/users/libnux/repos","events_url":"https://api.github.com/users/libnux/events{/privacy}","received_events_url":"https://api.github.com/users/libnux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-15T12:49:46Z","updated_at":"2015-09-16T08:47:28Z","closed_at":null,"body":"I setup a private v1 docker registry with authentication enabled using nginx proxy, and tried to push a docker application in diego. But it failed to stage: \r\n\r\n---\r\nStaging...\r\nStaging process started ...\r\nStaging process failed: Exit trace for group:\r\nbuilder exited with error: failed to fetch metadata from [docker.mi-ae.com.cn/diego] with tag [latest] and insecure registries [] due to Authentication is required.\r\nExit status 2\r\nStaging Failed: Exited with status 2\r\n\r\n---\r\n\r\nActually, I already specified the docker username and password when creating the app:\r\n<code><pre>\r\ncf curl /v2/apps -X POST -d '{\r\n  \"name\": \"dockertest\",\r\n  \"memory\":512,\r\n  \"instances\":1,\r\n  \"disk_quota\":1024,\r\n  \"space_guid\":\"79f86aed-b38a-4de7-98c6-c25471c2abb7\",\r\n  \"docker_image\":\"docker.xxxx.xxx.xx/diego\",\r\n  \"docker_credentials_json\":{\r\n    \"docker_user\":\"libnux\",\r\n    \"docker_password\":\"password\",\r\n    \"docker_email\":\"libnux@gmail.com\"\r\n  },\r\n  \"diego\": true\r\n}'\r\n</pre></code>\r\n "},"comment":{"url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/comments/140674440","html_url":"https://github.com/cloudfoundry-incubator/docker_app_lifecycle/issues/5#issuecomment-140674440","issue_url":"https://api.github.com/repos/cloudfoundry-incubator/docker_app_lifecycle/issues/5","id":140674440,"user":{"login":"hsiliev","id":732222,"avatar_url":"https://avatars.githubusercontent.com/u/732222?v=3","gravatar_id":"","url":"https://api.github.com/users/hsiliev","html_url":"https://github.com/hsiliev","followers_url":"https://api.github.com/users/hsiliev/followers","following_url":"https://api.github.com/users/hsiliev/following{/other_user}","gists_url":"https://api.github.com/users/hsiliev/gists{/gist_id}","starred_url":"https://api.github.com/users/hsiliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsiliev/subscriptions","organizations_url":"https://api.github.com/users/hsiliev/orgs","repos_url":"https://api.github.com/users/hsiliev/repos","events_url":"https://api.github.com/users/hsiliev/events{/privacy}","received_events_url":"https://api.github.com/users/hsiliev/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T08:47:28Z","updated_at":"2015-09-16T08:47:28Z","body":"Unfortunately you can only do this using the cache. There is a story to support private images without the cache: https://www.pivotaltracker.com/story/show/95230604\r\n\r\nDo you use the same registry for caching and for storing private images?"}}