- create entry in config file @ ~/.ssh/config:
Host host_alias HostName host_name IdentityFile ~/.ssh/rsa_pvt_key User user_name <<<
- configure git origin to use alias
$ git remote add origin git@host_alias:repo_owner_name/repo_name.git
so, if the original url was [email protected]:yoco-dev/yoco-core.git and we have created an entry in config with host alias bitbucket, e.g.
Host bitbucket HostName bitbucket.com IdentityFile ~/.ssh/my_bitbucket_public_key User my_bitbucket_user
git remote add origin git@bitbucket:yoco-dev/yoco-core.git