gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Support defaultKeyCommand for [gpg "ssh"] setting

Open 3f6a opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

I would like to sign commits with my SSH key.

Describe the solution you'd like

Usually I setup my .gitconfig as follows:

[commit]
	gpgsign = true
[gpg]
	format = ssh
[gpg "ssh"]
	defaultKeyCommand = ssh-add -L

This way, it will pick up the ssh key from the ssh-agent as needed.

However it seems that gitui does not understand defaultKeyCommand. As a consequence, I cannot sign commits on remote computers (which receive the key from the agent).

3f6a avatar Apr 14 '24 20:04 3f6a

We also are experiencing this issue in our developer environments. This is quite unfortunate as we were quite excited and about to document gitui internally as a recommendation.

@extrawurst @cruessler Do either of you know if this is the expected behavior or a technical limitation?

ofek avatar Aug 17 '25 22:08 ofek

I’m not really familiar with how commit signing currently works in gitui, so can’t provide much context on that. What I do know, however, is that commit signing is something that’s on gitoxide’s roadmap as well. In the future, as we replace more of git2 (which is currently used in most places for interacting with git) by gitoxide, we might be able to address this specific issue, though the exact roadmap is unclear.

I hope this helps at least a little, even though it’s light on the specifics!

cruessler avatar Aug 18 '25 07:08 cruessler