
Currently working as a Senior Consultant at Netcompany spending my full-time job solving the SharePoint riddles. In the free time I'm expanding my understanding of cybersecurity through hacking activities. Git fanboy.
Search for a command to run...

Currently working as a Senior Consultant at Netcompany spending my full-time job solving the SharePoint riddles. In the free time I'm expanding my understanding of cybersecurity through hacking activities. Git fanboy.
Wow. Didn't know about that!
But what is the significance of Github commit signing? What does it mean if I have a commit verified by the commit author?
That's a good question. I believe it is more important in some bigger or more significant projects, when you want to know if commits really come from a legitimate person.
Because the private key (and passphrase) is known only to a specific person - by seeing that a commit is signed using that key, you can trust the content of this commit. Unless that person's private key is leaked and passphrase is cracked or obtained in other way, there is no possibility to create a malicious commit by an impersonating real author.
Think about such big projects like Linux Kernels. These are wide used products and the opportunity to upload a backdoor or vulnerability can be really tempting for malicious actors.
A Deep Dive into Rootkit Detection via Linux Memory Forensics - HackTheBox Business CTF 2025

💡 This write-up is a part of the HTB Sherlocks series. Sherlocks are investigative challenges that test defensive security skills. I encourage you to try them out if you like digital forensics, incident response, post-breach analysis and malware ana...

Hack The Box Sherlock write-up

💡 This write-up is a part of the HTB Sherlocks series. Sherlocks are investigative challenges that test defensive security skills. I encourage you to try them out if you like digital forensics, incident response, post-breach analysis and malware ana...

Hack The Box CTF Cyber Apocalypse 2025: Tales from Eldoria

Have you noticed some commits on GitHub are marked as Verified? Do you want that fancy looking icon next to your GitHub commits?

Or Git history?

Here is how!
gpg installation🔔
CyberEthical.Meis maintained purely from your donations - consider one-time sponsoring with the Sponsor button or 🎁 become a Patron which also gives you some bonus perks.
*.sig file.Import GnuPG public keys with verified gpg binary.
gpg that comes with Git installation from Git Bashwhere gpg
gpg --version
*.asc file gpg --import gnugp.asc
gpg --list-keys --keyid-format LONG
Note the key-id that identifies key on the current environment
pub rsa2048/249B39D24F25E3B6 2011-01-12 [SC] [expires: 2021-12-31]
Verify that imported keys matches keys on the GnuPG public keys reference page. Trust each key by using following command. Use ultimate trust.
gpg --edit-key {key-id} trust
Verify that GnuPG keys are trusted (expired ones won't show the ultimate trust flag)
$ gpg --list-keys --keyid-format LONG
pub rsa2048/249B39D24F25E3B6 2011-01-12 [SC] [expires: 2021-12-31]
D8692123C4065DEA5E0F3AB5249B39D24F25E3B6
uid [ultimate] Werner Koch (dist sig)
pub rsa2048/2071B08A33BD3F06 2014-10-29 [SC] [expired: 2020-10-30]
031EC2536E580D8EA286A9F22071B08A33BD3F06
uid [ expired] NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org>
pub rsa3072/BCEF7E294B092E28 2017-03-17 [SC] [expires: 2027-03-15]
5B80C5754298F0CB55D8ED6ABCEF7E294B092E28
uid [ultimate] Andre Heinecke (Release Signing Key)
pub ed25519/528897B826403ADA 2020-08-24 [SC] [expires: 2030-06-30]
6DAA6E64A76D2840571B4902528897B826403ADA
uid [ultimate] Werner Koch (dist signing 2020)
gpg: Signature made 07-04-2021 20:06:23 Central European Daylight Time
gpg: using EDDSA key 6DAA6E64A76D2840571B4902528897B826403ADA
gpg: Good signature from "Werner Koch (dist signing 2020)" [ultimate]
gpg.gpgwhere gpg
gpg --version
gpg report with language different that English set environment variable LANG=C. Restart command prompt.Create GPG key for Git signing. When key is purposed to be used on a Github follow latest instructions.
gpg --full-generate-key
gpg installation gpg --list-keys
gpg in the {SYSTEMDRIVE}/Users/{PROFILE}/.bash_profile (create file if needed) alias gpg="'C:\Program Files (x86)\gnupg\bin\gpg.exe'"
commit.gpgsign to true enables signing each commit by default. Without this each commit would have to be implicitly marked to be signed with -S flag (ex. commit -S -m "Add new file") git config --global gpg.program {PATH_TO_GPG}
git config --global user.signingkey {KEY_ID}
git config --global commit.gpgsign true
git config --global tag.forceSignAnnotated true
mkdir test-repo
cd test-repo
git init
git commit --allow-empty -m "Signed commit"
Sign can be verified using following methods.
$ git verify-commit 64796ee
gpg: Signature made 14-04-2021 10:00:09 Central European Daylight Time
gpg: using RSA key 551760C1C76669F30FEFCDAF59DCC37EB7307329
gpg: Good signature from "Kamil Gierach-Pacanek (Git signing key) <****@******.com>" [ultimate]
$ git show --show-signature 64796ee
commit 64796eeea6be5742828f5269a35585c98f02d3c2 (HEAD -> master)
gpg: Signature made 14-04-2021 10:00:09 Central European Daylight Time
gpg: using RSA key 551760C1C76669F30FEFCDAF59DCC37EB7307329
gpg: Good signature from "Kamil Gierach-Pacanek (Git signing key) <****@******.com>" [ultimate]
Author: Kamil Gierach-Pacanek <****@******.com>
Date: Wed Apr 14 09:59:52 2021 +0200
Signed commit
📌 Follow the
#CyberEthicalhashtag on the social media🎁 Become a Patron and gain additional benefits
👉 Instagram: @cyber.ethical.me
👉 LinkedIn: Kamil Gierach-Pacanek
👉 Twitter: @cyberethical_me
👉 Facebook: @CyberEthicalMe
In case following error occurs during the commit phase:
gpg: can't connect to the agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: skipped "34A91BE1A93DDAF6": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object
Run the following command to reload the agents.
gpgconf --kill gpg-agent gpg-connect-agent reloadagent /bye

First, ensure your username and email are the same that was used for the GPG key.
$ git config --get-all user.name
$ git config --get-all user.email
$ gpg -K --keyid-format SHORT
If so, the problem most certainly lies on the GPG itself. Try following command:
$ echo "test" | gpg --clearsign
If error message is saying
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device

Run below command and try again:
$ export GPG_TTY=$(tty)
Tip about exporting GPG_TTY variable sourced from here