Skip to content

Instantly share code, notes, and snippets.

@TheCureliestWalk
Last active July 9, 2021 10:12
Show Gist options
  • Save TheCureliestWalk/1e93f5139963eeabaa72664a5358c996 to your computer and use it in GitHub Desktop.
Save TheCureliestWalk/1e93f5139963eeabaa72664a5358c996 to your computer and use it in GitHub Desktop.
How to create GPG Signed key with Keybase on Github

Sign GPG Key on Github with Keybase

mrkdwn-pass

Set everything up

  • Linux Computer (Windows or MacOS is compatible but you need to install GIT manually)
  • You need to install Keybase, login or sign up one if you don't have.
  • Your basic skill with Git and Github:

You need to know that Linux are have a default software: gpg for sign the GPG key. but we are going to use Keybase instead.

This information if it contains** SOME_THING_IN_THIS_SENTENCE **in code block that means you can add everything you like. Some of words are not code, so please read carefully.

Check up Step

  • SSH keys have already setup.
  • Have some repositories cloned on your computer.

After installed Keybase -- Very first, you need to make sure everything is good by doing these commands: run_keybase For running Keybase, if you type keybase --version, and it output keybase version 1.0.39-20180119172947+d29f565ed then, type git --version if it's show up like this git version 2.14.1 so everything is fine.

Getting Started

Now, let's create the GPG key: type keybase pgp gen fill up all the information related with or without your Github account. Type keybase pgp export > gpg.key. Now your public key will be exported in gpg.key file. Please remember your e-mail

Login to your Github account in your browser: Go to Settings --> SSH and GPG keys --> New GPG key

Open gpg.key in text editor, copy all code (use ctrl+a for select all text) paste the code, click New GPG key

1

In this GPG keys, you will see Key ID. Copy this key.

Now open your Terminal. type and fill your copied key: git config --global user.signingkey __ADD_YOUR_KEY_HERE__ and type this command: git config --global user.email __YOU_REMEMBERED_E-EMAIL_THAT_YOU_HAD_GENERATED_

DONE. Let's go the final step.

Final Step

Let's test, and see how it's worked.

Create some file, type git add . and git commit -S -m "LETTER_THAT_YOU_WANT" looks like this.

2

Then, git push

Go to your repository on Github in browser, click on releases (see the picture below.) 3

click Draft a new release, in tag version add some version e.g. 1.0.0.0 Click Publish Release. You'll found a green Verified badge (see the picture below.), This means you are FINALLY DONE! 4

For video version of Final Step

Click Here


All made by Iho Somnam

Thanks for reading. :)
@TheCureliestWalk
Copy link
Author

Very nice instruction. Even I forget I can read and understand this.

@gtrabanco
Copy link

I have automated all this process: https://gist.github.com/gtrabanco/df7a2c7c5078ebe2a1a7332e2536dadb

Have a look before in the script code and later you can execute it remotely by using:

bash < <(curl --silent https://gist.githubusercontent.com/gtrabanco/df7a2c7c5078ebe2a1a7332e2536dadb/raw/dc8a1478b0e8c3f235b42a55e072995244f1d56a/keybase-gpg.sh)

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