How to keep the commits signed with GPG key #209
-
Hi there. I'm using git-filter-repo to purge secrets that I accidentally committed a long time ago (SMTP and database passwords) and everything works great, but I noticed that after I perform the operation, all signed commits aren't signed anymore. Is it possible to tell the program to use a certain GPG key while rewriting the history of my repository? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
git filter-repo builds on top of fast-export and fast-import. fast-export has to strip the existing signatures because they won't be valid after the modifications to history. And fast-import has no option to add a signature to commits with some specified key. Such a feature would need to be added to upstream git, then filter-repo would be able to use it. Sorry there isn't a better answer at this time. |
Beta Was this translation helpful? Give feedback.
-
Although you cannot keep the existing GPG signed commits you may always resign them. |
Beta Was this translation helpful? Give feedback.
git filter-repo builds on top of fast-export and fast-import. fast-export has to strip the existing signatures because they won't be valid after the modifications to history. And fast-import has no option to add a signature to commits with some specified key. Such a feature would need to be added to upstream git, then filter-repo would be able to use it.
Sorry there isn't a better answer at this time.