I often run into to issues where I like to use different ssh keys for different sites, servers, and other things. It is a good practice not to use the same key for everything just in case you need to change it, or other various reasons. If you are like me and don't want to manually enter the path to theses keys each time you can associate them with a url. So if you were connecting via ssh, or over git with ssh it works perfectly.
So first generate a key. In this example we will create one for Bit Bucket.
1 |
|
Now inside the \~/.ssh folder edit the config file and add the text below.
1 2 3 |
|
At this point when you push to bitbucket it will use this key.. For example if you added the remote repo as origin
1 |
|
It should prompt you for your ssh unlock pass phrase.