Skip to content

Instantly share code, notes, and snippets.

@b14ck0ps
Last active June 4, 2023 16:04
Show Gist options
  • Save b14ck0ps/3f4942a8f1b566c806faa0520397a39e to your computer and use it in GitHub Desktop.
Save b14ck0ps/3f4942a8f1b566c806faa0520397a39e to your computer and use it in GitHub Desktop.
This works for me.
  • Download GPG4Win
  • Open CMD
  • gpg --full-gen-key
  • Please select what kind of key you want: (4) RSA (sign only)
  • RSA keys may be between 1024 and 4096 bits long. What keysize do you want? 4096
  • Please specify how long the key should be valid. 0 = key does not expire
  • Key does not expire at all Is this correct? (y/N) Y
  • name , email , comment
  • Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O

After Creating the GPG key git config --global user.signinkey <key> git config --global commit.gpgsing true git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"

GPG ID

gpg --list-secret-keys --keyid-format LONG

For github public key:

gpg --armor --export <key id>

password manager wont pop up ? echo "test" | gpg --clearsign this should fix this.

For Linux export GPG_TTY=$(tty) add this to bashrc or zshrc

DO NOT USE TERMINAL . USE gold old CMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment