Downloading my private key for use in git on Mac

I am trying to use git on Mac (I am a Mac newbie). I obviously have to upload my private key. On my windows machine, I just use pageant and msysgit. How do I upload a private key to git on Mac?

+2


source to share


3 answers


Git has a good article on creating and using your private keys here:



http://github.com/guides/providing-your-ssh-key

+5


source


If you open the key with PuTTY Key Generator

, you can export your key in OpenSSH format. Just copy this to your Mac and place it as a named file id_rsa

in a directory ~/.ssh

(which you will need to create if you haven't run ssh-keygen).

Export OpenSSH key



If that's not much of a problem though, you can simply use ssh-keygen

to create a new key pair and add the new public id_rsa.pub

key to the account you are accessing. Most online git repositories and ssh hosts (like Winsshd) allow you to bind multiple keys to an account.

+1


source


I would say just create a new key. If you are submitting to github, there is nothing to do to push the two public keys up and also to post to another server - this is just another entry in ~ / .ssh / authorized_keys.

The github guide localshred pointer it points to should have all the directions you need.

0


source







All Articles