Vagrant Tips for Developer Relations Activities


#1

Automatically Keep VirtualBox Guest Additions Up to Date

$ vagrant plugin install vagrant-vbguest

More: vagrant-vbguest GitHub repository

Access Jekyll Inside of Linux Guest From Browser on Windows Host

Set jekyll IP to 0.0.0.0 NOT 127.0.0.1 (which is the default)

From Linux guest

$ jekyll serve --host 0.0.0.0

From Windows host

Force Auto-Regeneration of Jekyll Shared Folder

$ jekyll server --host 0.0.0.0 --force_polling 

–force_polling forcing the regeneration, which I found did not work with –watch or serve on the Linux guest in the shared folder with Windows.

Push to GitHub with No Password

From Vagrant guest, leave passphrase blank.

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/vagrant/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/vagrant/.ssh/id_rsa.
Your public key has been saved in /home/vagrant/.ssh/id_rsa.pub.

Copy the public cat to clipboard.

$ cat ~/.ssh/id_rsa.pub

Log into your GitHub account. Go to settings -> SSH and GPG keys -> New SSH Key

Paste the public key in your clipboard into the GitHub input box.