parente / tott

Tools of the Trade website
http://tott-meetup.rtfd.org
MIT License
17 stars 10 forks source link

ssh key on Windows doesn't work from mount #8

Open parente opened 10 years ago

parente commented 10 years ago

Permissions are too open. Document alternative approach for windows.

parente commented 10 years ago

Added steps to the provision.sh gist downloaded and invoked by the Vagrantfile bash provisioner to correct the key issue. The script now:

  1. Moves any /vagrant/.ssh keys to /vagrant/.keys. This is to prevent old lines in the .bashrc from using these keys in the old location.
  2. Copies /vagrant/.keys/github and bitbucket to ~vagrant/.ssh.
  3. Sets permissions and ownership properly on the keys in ~vagrant/.ssh.
  4. Adds a test to see if github or bitbucket keys are loaded at the end of .bashrc. Loads them in the spawned agent if not.

This makes the provision.sh gist specific to the 2013_12_05 tottbox build. I need to update the packer scripts to start from this new logic for the next tottbox build and select a new provision script gist. More likely, I'll just point it to a blank provision script in this git project instead.

bernardpaulus commented 9 years ago

Hi,

Using the updated script, I encountered some chmod errors:

chown: cannot access `/home/vagrant/.ssh/github': No such file or directory
chmod: cannot access `/home/vagrant/.ssh/github': No such file or directory
chown: cannot access `/home/vagrant/.ssh/bitbucket': No such file or directory
chmod: cannot access `/home/vagrant/.ssh/bitbucket': No such file or directory

I edited the gist to make a nice error message as this state is part of the normal setup workflow ( tottbox -> git -> GitHub )

Cheers