For our development environments we are working predominantly in Vagrant so that we all have a consistent dev env.
One challenge which arose was how to clone from GitHub within the Vagrant-created VM. We achieved this using ssh agent forwarding:
1. Add your SSH key which is tied to GitHub account to host
key_file=~/.ssh/id_rsa # Add if not already added [[ -z $(ssh-add -L | grep $key_file) ]] && ssh-add $key_file
2. Enable SSH agent forwarding in your
config.ssh.forward_agent = true
You will then be able to do the following:
$ vagrant ssh [vagrant@localhost ~]$ ssh -T email@example.com Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
(as usual you'll have to authorise GitHub's public RSA key so it can be added to the