Junyangz's docs
  • Introduction
  • Ops
    • Linux-tips
    • MySQL-5.7.20
    • Upgrading MySQL
    • Upgrade OpenSSH to 7.7p1 in CentOS 6
    • Linux PERSISTENT NAMING
    • Use Kafka with Flume - CRS2
    • Setup Chroot SFTP in CentOS
    • Setup software RAID-5 in CentOS
    • SSH-port-forwarding
    • Elasticsearch In Production
    • ELK-simple-tutorial
    • Ansible Playbooks for Apache Kafka in production
    • GitHub Actions depoly Hexo
    • Test HTTP3/QUIC docker
    • Docker tutorial
    • SFTP-auth-pubkey
    • Linux Process Substitution
  • Note
    • Interview
      • interview-prepare
      • 2020-campus-recruiting
    • Android Tips
    • MacOS tips
    • Secret knowledge
    • GPG-Note
    • ud185
    • ud185-2
    • Introducing Tensorflow Federated
    • Tensorflow Federated
    • Expert Python Programing
    • What happens when zh_CN
    • TILGC
    • VScode keyboard shortcuts
    • Abseil Python
    • Latex Note
    • Git Cheatsheet
    • Study Smarter Not Harder
    • Machine Learning Interviews
    • 深度学习中的优化
    • Beej's Guide to Network Programming Note
      • ch4
      • ch5
      • ch6
      • ch7
  • [Share]
    • What to do after what to do
    • Truman is everywhere
    • Way2outer
    • 未来十五年
  • Quote
Powered by GitBook
On this page
  • Import/export key
  • Edit passphrase
  • Git setup gpg sign
  • gpg and git for MAC

Was this helpful?

  1. Note

GPG-Note

Import/export key

gpg --list-keys
gpg --armor --output <public-key-file> --export <ID>
gpg --import <public-key-file>
gpg --keyserver hkp://keys.gnupg.net --search-keys <ID>
gpg --armor --output <private-key-file> --export-secret-keys <ID>
gpg --allow-secret-key-import --import <private-key-file>
gpg --list-secret-keys --keyid-format LONG

Edit passphrase

gpg --edit-key <ID>
passwd

Git setup gpg sign

Github add gpg public key

git config --global commit.gpgsign true
git config --global gpg.program gpg

gpg and git for MAC

# import keys
gpg2 --list-secret-keys
git config --global gpg.program /usr/local/bin/gpg2
git config --global user.signingkey 987BACA4 
git config --global commit.gpgsign true 
PreviousSecret knowledgeNextud185

Last updated 2 years ago

Was this helpful?

Refer

gists