Skip to main content

Access private repos with your own ssh public key out of a vagrant box

It's a one liner in your vagrant file:

config.ssh.forward_agent = true

If it does not work out of the box, do the following in the guest:

mkdir -p ~/.ssh

chmod 700 ~/.ssh

ssh-keyscan -H github.com >> ~/.ssh/known_hosts

ssh -T git@github.com