Compare commits

...

6 Commits

1 changed files with 35 additions and 7 deletions

View File

@ -7,15 +7,43 @@ which does about the same for PGP.
## Where to find keys
* GitHub, Giteas and GitLabs expose user public keys when you append a .keys after their profile page
* Good ideas are made to be copied, so maybe there will be more repositories like this ;)
* GitHub, Giteas and GitLabs expose user public keys (without useful names)
when you append a `.keys` after their profile page
* For example: https://github.com/Mikaela.keys https://gitea.blesmrt.net/Mikaela.keys https://gitlab.com/Mikaela.keys
* Good ideas are made to be copied, so maybe there will be more repositories like this :wink:
## Quick howto
I don't mean this to be used directly, only to be took inspiration from. See the first
link in further reading.
```bash
mkdir -p ~/src/gitea.blesmrt.net/Mikaela
cd ~/src/gitea.blesmrt.net/Mikaela
git clone https://gitea.blesmrt.net/Mikaela/ssh-allowed_signers.git
git config --global gpg.ssh.allowedSignersFile ~/src/gitea.blesmrt.net/Mikaela/ssh-allowed_signers/allowed_signers
```
Git commands should now recognised commits signed with keys I have allowed.
In the last command it's fine to remove `--global` to only affect the single
repository you are on (while I haven't tested this), should that repository
be something only I am signing in or something I need to verify otherwise
enough to list it here.
On the last command, `git config` turns it into absolute path, while manually
edited `.gitconfig` can literally have the above. I wonder if the command
would understand `--` before the file, but not enough to actually try it :smiley:
## Further reading
* [Caleb Hearth: Signing Git Commits with Your SSH Key](https://calebhearth.com/sign-git-with-ssh), [web.archive.org](https://web.archive.org/web/20211117182628/https://calebhearth.com/sign-git-with-ssh), inspired me to try this
* [GitHub feedback: Allow using SSH keys to sign commits](https://github.com/github/feedback/discussions/7744)
* TODO: notify here when it actually works, link to their guide or maybe remove the section?
* [Caleb Hearth: Signing Git Commits with Your SSH Key](https://calebhearth.com/sign-git-with-ssh) ([web.archive.org](https://web.archive.org/web/20211117182628/https://calebhearth.com/sign-git-with-ssh)) inspired me to try this
* [Andrew Ayer: It's Now Possible To Sign Arbitrary Data With Your SSH Keys](https://www.agwa.name/blog/post/ssh_signatures) instructs on signing and verifying files outside of git
### Forge support
* [Merged Gitea PR for add support for ssh commit signing](https://github.com/go-gitea/gitea/pull/17743)
* TODO: link to their blog once it's released
* [Fedora update request for git](https://bugzilla.redhat.com/show_bug.cgi?id=2029604)
* TODO: remove this mention when it happens? It does have the test instructions I took
* [GitHub feedback: Allow using SSH keys to sign commits](https://github.com/github/feedback/discussions/7744)
* TODO: notify here when it actually works, link to their guide or maybe remove the section?
* [GitLab issues: Support for SSH signed commits](https://gitlab.com/gitlab-org/gitlab/-/issues/343879)
* TODO: a better link when this happens