techpeace/personal-site-template — pull request #14 by todb-r7 (2014-11-14 21:02:04+00:00)
Title: Update Rakefile to allow for ssh aliases

I usually set up my remote github URL as

github: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.