johnpoint

johnpoint

(。・∀・)ノ゙嗨
github

Use SSH key to sign git commit.

In the article Adding Verified Badge to Github Commits, gpg key signing was configured as a means to indicate the trustworthiness of git commits with credentials. However, I gradually found it to be a bit troublesome to use the signing process with gpg keys, as they don't have many other uses in my daily life. Recently, Github introduced support for displaying commits signed with SSH keys. SSH keys are much more commonly used in daily activities, so I configured them and decided to write an article documenting the process.

git config --global gpg.format ssh
git config --global user.signingKey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true
git config --global tag.gpgsign true

In general, after configuring these options, you should be able to successfully add signatures. If you receive a prompt saying ssh format is not supported when committing with git, it means that the current version of git does not support signing commits with SSH keys, and you will need to update the git version on your system.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.