I have an account on an ssh-friendly lab machine where I store a lot of private projects so I can access them from multiple computers (and it allows me to only use my few privat
Use a full SSH path rather than Git’s shorthand:
git = "ssh://landmachine/bar/foo"
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.