I have to keys in ~/.ssh dir. When I am trying to commit something in console bitbucket is asking me for password instead use ssh key. Also when I try to clone this repo in order to use global git settings it is still asking me for password.
My questions:
- how to config git to use ssh keys?
- how to force it?
- which key it is trying to use?
- is it trying to much it by email? (if yes than is it using mail from global config or local repository config?)
- can I use ssh key without additional password, or is it required to have one?
To make GIT use a specific SSH key, you prefix the GIT command with
Where "path-to-key" is the path to the private SSH key (without the ".pub").
So if you would like to clone from git://random-address and your public key is in /home/me/.ssh/mysecondkey.pub, you run:
You need to make sure that you choose a clone-URL which does not start with "https://", but either "ssh://" or "git://". I know at least GitHub lets you choose which one to use.