@@ -18,7 +18,8 @@ Thanks!
1818 Run
1919
2020 ```
21- $ (trezor|keepkey|ledger|jade|onlykey)-gpg init "Roman Zeyde <[email protected] >" 21+ $ (trezor|keepkey|ledger|jade|onlykey)-gpg init
22+ $ (trezor|keepkey|ledger|jade|onlykey)-gpg add -d "Roman Zeyde <[email protected] >" 2223 ```
2324
2425 Follow the instructions provided to complete the setup. Keep note of the timestamp value which you'll need if you want to regenerate the key later.
@@ -137,13 +138,14 @@ $ gpg2 --export '
[email protected] ' | gpg2 --list-packets | grep created | head -n1
137138
138139After your main identity is created, you can add new user IDs using the regular GnuPG commands:
139140```
140- $ trezor-gpg init "Foobar" -vv
141+ $ trezor-gpg init
142+ $ trezor-gpg add -d "Foobar" -vv
141143$ export GNUPGHOME=${HOME}/.gnupg/trezor
142144$ gpg2 -K
143145------------------------------------------
144- sec nistp256/6275E7DA 2017-12-05 [ SC]
146+ sec nistp256/6275E7DA 1970-01-01 [ SC]
145147uid [ ultimate] Foobar
146- ssb nistp256/35F58F26 2017-12-05 [ E]
148+ ssb nistp256/35F58F26 1970-01-01 [ E]
147149
148150$ gpg2 --edit Foobar
149151gpg> adduid
@@ -159,10 +161,24 @@ gpg> save
159161
160162$ gpg2 -K
161163------------------------------------------
162- sec nistp256/6275E7DA 2017-12-05 [ SC]
164+ sec nistp256/6275E7DA 1970-01-01 [ SC]
163165uid [ ultimate] Xyzzy
164166uid [ ultimate] Foobar
165- ssb nistp256/35F58F26 2017-12-05 [ E]
167+ ssb nistp256/35F58F26 1970-01-01 [ E]
168+ ```
169+
170+ This adds new user IDs to the same key. You can also add a new key using the `add` command:
171+ ```
172+ $ trezor-gpg add "Xyzzy" -vv
173+ $ gpg2 -K
174+ ------------------------------------------
175+ sec nistp256/6275E7DA 1970-01-01 [ SC]
176+ uid [ ultimate] Foobar
177+ ssb nistp256/35F58F26 1970-01-01 [ E]
178+
179+ sec nistp256/BE61C208 1970-01-01 [ SC]
180+ uid [ ultimate] Xyzzy
181+ ssb nistp256/65088366 1970-01-01 [ E]
166182```
167183
168184### Generate GnuPG subkeys
@@ -173,7 +189,17 @@ pub rsa2048/90C4064B 2017-10-10 [SC]
173189uid [ ultimate] foobar
174190sub rsa2048/4DD05FF0 2017-10-10 [ E]
175191
176- $ trezor-gpg init "foobar" --subkey
192+ $ trezor-gpg add "foobar" --subkey
193+ ```
194+
195+ If you have already set the new folder as your default profile, and you want to add the subkey to an existing GnuPG from a previous (e.g. non-hardware) profile, you can specify the previous profile location using `--primary-homedir`:
196+ ```
197+ $ gpg2 -k foobar --homedir ~ /.gnupg
198+ pub rsa2048/90C4064B 2017-10-10 [ SC]
199+ uid [ ultimate] foobar
200+ sub rsa2048/4DD05FF0 2017-10-10 [ E]
201+
202+ $ trezor-gpg add "foobar" --subkey --primary-homedir ~ /.gnupg
177203```
178204
179205[](https://asciinema.org/a/Ick5G724zrZRFsGY7ZUdFSnV1)
0 commit comments