Import/Export key pair
David Shaw
dshaw@jabberwocky.com
Tue Jan 29 23:49:01 2002
On Tue, Jan 29, 2002 at 02:24:19PM -0800, Olivier Pasco wrote:
> Hi,
>
> I have not found in the documentation a way to save my key pair in order
> to use it on another computer. Do I have just to copy the files from my
> .gnupg directory ?
gpg --export my_key -o my_public_key.gpg
gpg --export-secret-key my_key -o my_secret_key.gpg
Copy my_public_key.gpg and my_secret_key.gpg over, and --import them.
If you are using the current version of GnuPG (1.0.6) or earlier, you
need to set --allow-secret-key-import as well:
gpg --import my_public_key.gpg
gpg --allow-secret-key-import --import my_secret_key.gpg
Theoretically you could copy the files from the .gnupg directory, but
this is not a good idea for various reasons (it may not work in the
future being high on the list). --export and --import is the proper
way to do this.
David
--
David Shaw | dshaw@jabberwocky.com | WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson