Open xnuk opened 8 years ago
Thank you very much for a valuable bug report!
I guess this happens because when the repository name is not available, there is a chance that it is a private repository (therefore not publicly visible), so GitHub lets you authenticate first.
A quick thought gives me a crude solution: when installing new plugins, first curl
the URL, and proceed to git clone
only when the curl
result isn't 404. But this requires an additional round trip to the GitHub server, slowing down the whole process.
Another quick and dirty solution would be to read stdout
of git clone
, and if it begins with Username for 'https://github.com':
, consider it a fail. This is obviously not a "Do the Right Thing" approach, but it will work for a while (until we come up with a better solution).
Setting GIT_TERMINAL_PROMPT=0
may help this.