-
-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to gpg sign a commit? #580
Comments
Did you try to change your [commit]
gpgsign = true |
The low-level plumbing that GitPython provides does not support signing commits. Even though I am closing the issue, please feel free to add comments below. |
But would git's commit-cmd work with an Index prepared with GitPython? |
Yes, provided you enforce the index to be written beforehand. |
I'm working on an example: https://github.com/josecelano/pygithub/pull/7/files#diff-6c2fa7bad72634a6226515e4345a04787a80b47fe56c5796993d902c4f279584 |
Indeed, the example seems to be suitable for that. The index is altered within GitPython, but the commit itself is created using Git just calls the |
I continue working on the example. I managed to sign it but not totally automatically. I can import the gpg key but More details: nautilus-cyberneering/pygithub#7 (comment) |
Great work! It seems like this pushed the problem into the realm of GPG and how to configure a passphrase without user input. |
I've found the problem. I was using the keygrip of a subkey. That's why the passphrase preset did not work. I'm going to clean the example and write a full explanation. I want to extract the key import/config to its own function so that other people can use it directly. Although from the
|
I have finished an example: https://github.com/josecelano/pygithub/blob/main/src/03_sign_commit_using_the_gitpython_package.py with a full explanation: |
Hello,
I'm using
But my commits don't have my gpg signature. How can I make a commit that is signed with the gpg signature? This is important for me to make automated signed commits, that can be pushed to the remote as the remote is set up to only accept signed commits.
Thanks for your help.
The text was updated successfully, but these errors were encountered: