git-remote-gcrypt incompatible with ssh user.signingkey?
Wesley Moore
wes at wezm.net
Mon Jul 17 06:29:45 BST 2023
Hello,
Thanks for you efforts maintaining git-remote-gcrypt. Wanted to run an issue I ran into past you.
>From git 2.34 it became possible to sign commits with an SSH key[1]. I am using this but it seems that it is not compatible with git-remote-gcrypt. You can see my git config here:
https://github.com/wezm/dotfiles/blob/6f5a8fc22636065122cc3022503aa43f703ee016/config/git/config
The user.signingkey, gpg.format, and commit.gpgsign setting are relevant. When I try to push my repo with this configuration I see:
gcrypt: Encrypting to: --throw-keyids --default-recipient-self
gcrypt: Requesting manifest signature
usage: gpg [options] --sign --encrypt [filename]
error: failed to push some refs to 'gcrypt::rsync://git@myhost:private.git'
(where my real host is replaced with myhost)
If I switch my git config back to an earlier version[2] that signs with gpg, then the error does not happen.
Environment info:
OS: Arch Linux
Git version: 2.41.0
git-remote-gcrypt version: 1.5
Based on the error and format of my user.signingkey it's possible that this is another instance of the issue handling spaces in user.signingkey that was reported previously[3], although I don't think it's possible to format the ssh key without spaces (I think the leading "ssh-rsa " is required).
Regards,
Wes
[1]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-usersigningKey
[2]: https://github.com/wezm/dotfiles/blob/0dd7872d529223272fbb9eccb3afabb8981f885a/config/git/config
[3]: https://www.chiark.greenend.org.uk/pipermail/sgo-software-discuss/2021/000712.html
More information about the sgo-software-discuss
mailing list