HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
Export Public Key “mypubkey.txt”
List All Keys
gpg --list-key
(RESULT)
$ gpg --list-key
/home/cbkadal/.gnupg/pubring.kbx
--------------------------------
pub rsa4096 2021-09-11 [SC] [expires: 2024-08-15]
CE17E9DB8AD01794E3BAE98B60914D29C01C81F1
uid [ultimate] Cicak Bin Kadal (CBK) <cbkadal@localhost>
sub rsa4096 2021-09-11 [E] [expires: 2024-08-15]
pub rsa4096 2022-02-07 [SC] [expires: 2024-09-10]
055FEB594B351CC03DE992C563FB12B215403B20
uid [ full ] RMS46 (RMS46) <rms46@xx.ac.id>
sub rsa4096 2022-02-07 [E] [expires: 2024-09-10]
List Your Own Key Only (e.g. cbkadal@localhost)
- check if your key is valid
- You are not cbkadal! Replace the ID with your ID.
- You are not cbkadal! Replace the ID with your ID.
gpg --list-key cbkadal@localhost
(RESULT)
$ gpg --list-key cbkadal@localhost
pub rsa4096 2021-09-11 [SC] [expires: 2024-08-15]
CE17E9DB8AD01794E3BAE98B60914D29C01C81F1
uid [ultimate] Cicak Bin Kadal (CBK) <cbkadal@localhost>
sub rsa4096 2021-09-11 [E] [expires: 2024-08-15]
Export Your Own Key to file “mypubkey.txt”
- Assuming your local git repo is “$HOME/git/os232/”
- Export public key to file “$HOME/git/os232/TXT/mypubkey.txt”
- You are not cbkadal! Replace the ID with your ID.
- You are not cbkadal! Replace the ID with your ID.
cd $HOME/git/os232/TXT/
rm -f mypubkey.txt
gpg --output mypubkey.txt --armor --export cbkadal@localhost
ls -al
(RESULT)
$ cd $HOME/git/os232/TXT/
$ rm -f mypubkey.txt
$ gpg --output mypubkey.txt --armor --export cbkadal@localhost
$ ls -al
total 20
drwxr-xr-x 2 cbkadal cbkadal 4096 Sep 11 23:55 .
drwxr-xr-x 5 cbkadal cbkadal 4096 Sep 11 23:51 ..
-rw-r--r-- 1 cbkadal cbkadal 568 Sep 11 23:51 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal 3159 Sep 11 23:55 mypubkey.txt
-rw-r--r-- 1 cbkadal cbkadal 9 Sep 11 23:51 myupdate.txt