techpeace / personal-site-template

A personal website template using Middleman and Zurb Foundation. Features a portfolio, blog, easy configuration-based setup, and Sass-based theming.
48 stars 27 forks source link

Update Rakefile to allow for ssh aliases #14

Closed todb-r7 closed 9 years ago

todb-r7 commented 10 years ago

I usually set up my remote github URL as

github-r7:username/repo

where 'github' is an .ssh/config alias that picks the right username and key, like so:

Host github-r7
Hostname github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/path_to_private_key

This kind of configuration is handy for people like me that have a billion keys for a billion different sites.

The logic change is simply to invert the match and meaning of .nil? -- if the user picks https, then use the https protocol format to pick the user. Otherwise, pick the username out from the ssh-style format.

This PR also contains a .ruby-version and .ruby-gemset.

todb-r7 commented 10 years ago

Incidentally, using your template was delightfully fun, @techpeace .

http://todb-r7.github.io/

(not sure how long it'll last, will be experimenting with a few others).

techpeace commented 9 years ago

Why, thank you! And thanks for the PR.