Is it possible to have Cargo fetch dependencies from a private remote git?

半世苍凉 提交于 2019-12-04 00:10:52
Steve Powell

On macOS Sierra, I had to create a .ssh/config file like this:

Host *
   UseKeychain yes
   AddKeysToAgent yes
   IdentityFile ~/.ssh/id_rsa

with the private key (RSA) file pointed to, and then issue the command:

ssh-add -K ~/.ssh/id_rsa

which (finally!) allowed an entry like:

git = "ssh://git@github.com/skipjaq/loda.git"

to work perfectly.

I do not know how often I will have to repeat the ssh-add command, but it appears this ought to hold at least until the next reboot.

This anomaly is apparently a feature of ssh-agent on macOS Sierra.

Use a full SSH path rather than Git’s shorthand:

git = "ssh://landmachine/bar/foo"
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!