{"action":"created","issue":{"url":"https://api.github.com/repos/SUSE/Portus/issues/663","labels_url":"https://api.github.com/repos/SUSE/Portus/issues/663/labels{/name}","comments_url":"https://api.github.com/repos/SUSE/Portus/issues/663/comments","events_url":"https://api.github.com/repos/SUSE/Portus/issues/663/events","html_url":"https://github.com/SUSE/Portus/issues/663","id":126574432,"number":663,"title":"crono synch job fails on private repository and deletes everything from database","user":{"login":"sshipway","id":1400897,"avatar_url":"https://avatars.githubusercontent.com/u/1400897?v=3","gravatar_id":"","url":"https://api.github.com/users/sshipway","html_url":"https://github.com/sshipway","followers_url":"https://api.github.com/users/sshipway/followers","following_url":"https://api.github.com/users/sshipway/following{/other_user}","gists_url":"https://api.github.com/users/sshipway/gists{/gist_id}","starred_url":"https://api.github.com/users/sshipway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sshipway/subscriptions","organizations_url":"https://api.github.com/users/sshipway/orgs","repos_url":"https://api.github.com/users/sshipway/repos","events_url":"https://api.github.com/users/sshipway/events{/privacy}","received_events_url":"https://api.github.com/users/sshipway/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SUSE/Portus/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-14T04:22:23Z","updated_at":"2016-01-21T16:57:51Z","closed_at":null,"body":"I have Portus running with the webhook working correctly, and API account created.  Authentication in registry 2.1 is passed on to Portus which uses LDAP.\r\n\r\nWhen the crono Catalogue synch job runs, it removes all the repositories from the database.\r\n\r\nThe synch job used to work, until another user logged in, created a group, and a private repository.\r\n\r\nFollowing logs, I can see that what is happening is this:\r\n- The Catalog job runs on the registry\r\n- All repositories are correctly identified `{\"repositories\":[\"registry\",\"sis/rea\",\"sshi052/janitor\",\"sshipway/minecraft-server\",\"sshipway/portus\",\"ubuntu\"]}`\r\n- It tries to identify tags, which works for public repositories\r\n- When calling on the private repository it receives a 404 with content `{\"errors\":[{\"code\":\"NAME_UNKNOWN\",\"message\":\"repository name not known to registry\",\"detail\":{\"name\":\"sis/rea\"}}]}`\r\n- This causes the function to immediately exit with an empty array\r\n- This causes it to synch against an empty array\r\n- Which causes all the database entries to be deleted.\r\n\r\nThis seems to have two big problems...\r\n- First, add_tags should not return immediately if tags are not found for a single repo\r\n- Secondly, why is it able to identify the repo exists, but not the tags?  Is Portus not authenticating back using its own portus account?  Is there an issue because I am using LDAP?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SUSE/Portus/issues/comments/173633685","html_url":"https://github.com/SUSE/Portus/issues/663#issuecomment-173633685","issue_url":"https://api.github.com/repos/SUSE/Portus/issues/663","id":173633685,"user":{"login":"mssola","id":767943,"avatar_url":"https://avatars.githubusercontent.com/u/767943?v=3","gravatar_id":"","url":"https://api.github.com/users/mssola","html_url":"https://github.com/mssola","followers_url":"https://api.github.com/users/mssola/followers","following_url":"https://api.github.com/users/mssola/following{/other_user}","gists_url":"https://api.github.com/users/mssola/gists{/gist_id}","starred_url":"https://api.github.com/users/mssola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mssola/subscriptions","organizations_url":"https://api.github.com/users/mssola/orgs","repos_url":"https://api.github.com/users/mssola/repos","events_url":"https://api.github.com/users/mssola/events{/privacy}","received_events_url":"https://api.github.com/users/mssola/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T16:57:50Z","updated_at":"2016-01-21T16:57:50Z","body":"@sshipway sorry for the delay from my side too ;) With #672 the first part will be fixed. Moreover, it will be backported to the `v2.0` branch, so an eventual (and rather soon) version 2.0.1 of Portus should include this fix.\r\n\r\nSo, as far as I understand it, the `rails runner bin/client.rb catalog` command gets it right, or ? Could you take a look at the logs ? Besides that, I'll do some investigation of my own :)"}}