{"action":"created","issue":{"url":"https://api.github.com/repos/ontohub/ontohub/issues/1161","labels_url":"https://api.github.com/repos/ontohub/ontohub/issues/1161/labels{/name}","comments_url":"https://api.github.com/repos/ontohub/ontohub/issues/1161/comments","events_url":"https://api.github.com/repos/ontohub/ontohub/issues/1161/events","html_url":"https://github.com/ontohub/ontohub/pull/1161","id":54563225,"number":1161,"title":"1159 create mirror of private GitHub repository","user":{"login":"eugenk","id":339751,"avatar_url":"https://avatars.githubusercontent.com/u/339751?v=3","gravatar_id":"","url":"https://api.github.com/users/eugenk","html_url":"https://github.com/eugenk","followers_url":"https://api.github.com/users/eugenk/followers","following_url":"https://api.github.com/users/eugenk/following{/other_user}","gists_url":"https://api.github.com/users/eugenk/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenk/subscriptions","organizations_url":"https://api.github.com/users/eugenk/orgs","repos_url":"https://api.github.com/users/eugenk/repos","events_url":"https://api.github.com/users/eugenk/events{/privacy}","received_events_url":"https://api.github.com/users/eugenk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-16T10:58:10Z","updated_at":"2015-02-03T19:54:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ontohub/ontohub/pulls/1161","html_url":"https://github.com/ontohub/ontohub/pull/1161","diff_url":"https://github.com/ontohub/ontohub/pull/1161.diff","patch_url":"https://github.com/ontohub/ontohub/pull/1161.patch"},"body":"This is more of a workaround than a fix for #1159.\r\n\r\nI don't see any fast way to check if something is a git repository than `git ls-remote`. However, this asks for credentials when calling it on a github private repository.\r\n\r\nI tried to read the login prompt of `git ls-remote` in `Subprocess.run`, but I could not get my hands on the prompt lines. Neither with `IO.popen` nor with `Open3.popen2e`.\r\n\r\nThe best solution would be to read those login prompt lines and abort if they are present, but I can't figure out how to do this, because they are not printed to stdout nor stderr of the child process."},"comment":{"url":"https://api.github.com/repos/ontohub/ontohub/issues/comments/72721799","html_url":"https://github.com/ontohub/ontohub/pull/1161#issuecomment-72721799","issue_url":"https://api.github.com/repos/ontohub/ontohub/issues/1161","id":72721799,"user":{"login":"jelmd","id":4813414,"avatar_url":"https://avatars.githubusercontent.com/u/4813414?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmd","html_url":"https://github.com/jelmd","followers_url":"https://api.github.com/users/jelmd/followers","following_url":"https://api.github.com/users/jelmd/following{/other_user}","gists_url":"https://api.github.com/users/jelmd/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmd/subscriptions","organizations_url":"https://api.github.com/users/jelmd/orgs","repos_url":"https://api.github.com/users/jelmd/repos","events_url":"https://api.github.com/users/jelmd/events{/privacy}","received_events_url":"https://api.github.com/users/jelmd/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T19:54:43Z","updated_at":"2015-02-03T19:54:43Z","body":"What about abusing GIT_ASKPSS? E.g.:\r\n```\r\necho '#!/bin/sh\\nprint \"$@\" >/tmp/out.txt' >/tmp/ask.sh\r\nchmod 755 /tmp/ask.sh\r\nexport GIT_ASKPSS=/tmp/ask.sh\r\ngit ls-remote ...\r\n```\r\n\r\nFore more see http://code.metager.de/source/xref/git/prompt.c#44 ;-)"}}