Description
Update (2018-10-30)
There's a workaround below for those interested:
[net]
git-fetch-with-cli = true
Original description
When cloning an SSH repository the only currently supported method of authenticating is picking up a key through ssh-agent. This can fail, however, for example if it's just not running! Cargo should support parsing .ssh/config
and/or otherwise having a reasonable fallback in trying to find public/private keys on the filesystem. Currently libssh2 does not support this, so an external library will be required.
As to the rationale for this issue, apparently when using CircleCI with a deploy key it will add this to ~/.gitconfig
:
[url "git@github.com:"]
insteadOf = https://github.com/
Which means that clones of the index will be rewritten to git@github.com
(SSH) instead of HTTPS. The ssh-agent apparently also isn't running, so it relies on ~/.ssh/config
to point SSH at the right keys, which Cargo isn't itself looking at.