views:

36

answers:

2

I read this article which explained very well how to setup pgp on osx, but I'm planning to use the generated keys for signing git commits, so I figure I need to transfer the keys to my other computer. Is this correct? and if so how do I go about transferring the keys?

+2  A: 

Yes, you will need to transfer the keys. Mac and Linux work the same, storing the keys in ~/.gnupg. The safest way to transfer the files is using scp (part of ssh):

scp -rp ~/.gnupg othermachine:

However, you will need to have ssh working first.

Transferring them with, say, a USB flash drive isn't such a great idea because your private key will be left behind on that drive even after you've deleted the file.

I don't know about the location of the directory on Windows. The gpg documentation will say, and the contents will almost certainly be the same.

Neil Mayhew
"Transferring them with, say, a USB flash drive isn't such a great idea because your private key will be left behind on that drive even after you've deleted the file." Well, if you are *so* paranoid, you can always encrypt the keys with some symmetric cipher for transfer.
Roman Cheplyaka
Good idea! Thanks.
Neil Mayhew
They private key is already encrypted with the passphrase you provided when you encrypted it. Encrypting it again doesn't make it more secure.
Ry4an
A: 

It depends on PGP software. All you need to do - is to found, where your keyrings files are physically located, and copy those files to the new computer. Or, export your keys from PGP software, and import them on the other side.

Nickolay O.