Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

66%
+2 −0
Q&A PGP sign emails sent with git-send-email(1)

It can't be done with git-send-email(1), but there's a tool that integrates with it, and is very simple to use: patatt(1). Install the tool: $ sudo apt-get install patatt And then for each rep...

posted 2y ago by alx‭  ·  edited 2y ago by alx‭

Answer
#7: Post edited by user avatar alx‭ · 2022-06-21T11:32:47Z (almost 2 years ago)
links
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • $ sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • $ cd /some/git/repo/
  • $ patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • $ patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git-am`(1) as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • $ sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • $ cd /some/git/repo/
  • $ patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • $ patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git-am`(1) as always, with confidence.
  • ---
  • See also:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • Source code:
  • <https://git.kernel.org/pub/scm/utils/patatt/patatt.git>
#6: Post edited by user avatar alx‭ · 2022-06-17T14:34:42Z (almost 2 years ago)
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • $ sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • $ cd /some/git/repo/
  • $ patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • $ patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • $ sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • $ cd /some/git/repo/
  • $ patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • $ patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git-am`(1) as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
#5: Post edited by user avatar alx‭ · 2022-06-17T14:34:20Z (almost 2 years ago)
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • $ sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • $ cd /some/git/repo/
  • $ patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • $ patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
#4: Post edited by user avatar alx‭ · 2022-06-17T14:33:55Z (almost 2 years ago)
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use `git-format-patch`(1) and `git-send-email`(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
#3: Post edited by user avatar alx‭ · 2022-06-17T14:32:53Z (almost 2 years ago)
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Basically, run:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Install the tool:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
#2: Post edited by user avatar alx‭ · 2022-06-17T14:32:14Z (almost 2 years ago)
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Basically, run:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).
  • Basically, run:
  • ```sh
  • sudo apt-get install patatt
  • ```
  • And then for each repo in which you want to sign patches, run:
  • ```sh
  • cd /some/git/repo/
  • patatt install-hook
  • ```
  • If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:
  • ```
  • [user]
  • name = Alejandro Colomar
  • email = alx.manpages@gmail.com
  • signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
  • ```
  • Then you're done. Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.
  • To validate a patch before appying it:
  • ```sh
  • patatt validate /path/to/incoming.patch
  • ```
  • If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents. If there's no signature it will print nothing (and return 0).
  • Then you can `git am ...` as always, with confidence.
  • ---
  • Source:
  • <https://lore.kernel.org/git/81caab7d-777e-13fe-89ea-820b7b2f0314@gmail.com/T/>
#1: Initial revision by user avatar alx‭ · 2022-06-17T14:31:34Z (almost 2 years ago)
It can't be done with `git-send-email`(1), but there's a tool that integrates with it, and is very simple to use: [`patatt`(1)](https://github.com/mricon/patatt).

Basically, run:

```sh
sudo apt-get install patatt
```

And then for each repo in which you want to sign patches, run:
```sh
cd /some/git/repo/
patatt install-hook
```

If you have a `gpg`(1) keyring, and `.gitconfig` knows about it:

```
[user]
	name = Alejandro Colomar
	email = alx.manpages@gmail.com
	signingKey = A9348594CE31283A826FBDD8D57633D441E25BB5
```

Then you're done.  Just use git-format-patch(1) and git-send-email(1) as always, and patches will be signed.

To validate a patch before appying it:

```sh
patatt validate /path/to/incoming.patch
```

If the patch contains a signature, it will print a human-readable message telling if the signautre is good (and also return 0) or bad (and also return non-zero), according to your keyring and the patch contents.  If there's no signature it will print nothing (and return 0).

Then you can `git am ...` as always, with confidence.