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