How to sign git commits with fish Shell

MageshBabu K
3 min readDec 28, 2020

--

Hello There 👋!

Prerequisite:

  • GPG Installed
  • Git Installed

Fish Shell

Generating GPG Key

GPG Generation Command
Generating GPG Key
  • After generation of your GPG Key, run the below command to list your GPG Keys
  • Now Copy The ID like this

- Tell Git about your signing Key, make sure that you have configured git name and email

replace ED267DF4249ACCC3 with your own
  • Here `ED267DF4249ACCC3` is my GPG key ID, replace it with yours.
  • Now set The value of GPG_TTY value.

- Add the above line to your config.fish file which is located in $HOME/.config/fish/config.fish

- Now let us test if our GPG works by running

- If it prompts password for using your GPG key (if any) and generates a sign like above, then your GPG Sign is configured successfully to sign commits

  • To sign a commit

git commit -S -m “your message”

Signing commits with our key
  • You can check for Sign by running

- To get verified, you must add your GPG Key to your github account.

  • Export the GPG Public by running
remember to replace ED267DF4249ACCC3
with your own.

- Visit GitHub, login and click your profile icon, select settings

Open the menu by clicking profile icon

- In the user settings sidebar, click SSH and GPG keys.

- Click the add GPG key button

click new GPG key
  • Paste the GPG that we have copied.

- Click the add GPG Key button.

- Now your commits that are signed with it are shown as verified in GitHub 😃

Will Link post for windows CMD and Bash below after ASAP! 🤓

Thanks for reading the Post!, Have a nice day!! 😄

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

MageshBabu K
MageshBabu K

Written by MageshBabu K

A enthusiastic Web and Android developer

Responses (1)

Write a response