Add the new key to your GitHub/BitBucket account
- Open
.git/config
file to see your GIT configuration in your project folder - Make sure the project is using the SSH as
url
parameter. Ex.git@github.com:USER/PROJECT.git
- Add before the host your alias name. Ex.
git@office.github.com:USER/PROJECT.git
- Open
~/.ssh/config
file to create/edit your custom SSH configuration - Add these lines
# GITHUB
Host YOURALIS.github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/YOURKEYNAME
# BITBUCKET
Host YOURALIS.bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/YOURKEYNAME
Lelle - License