Skip to main content
scottaw
Mar 27, 2022 12:47 AM UTC
Question

gpg signing key

This is probably the wrong category for this question, so please feel free to move it to the correct place, however it relates to 1Password 8 beta (Mac). Is there a way for me to put my git signing key into 1Password to sign my commits with? I have all my ssh keys working and my GitHub account works, but signing still requires me to enter a key passphrase.


1Password Version: 8.7.0
Extension Version: 2.3.1
OS Version: macOS 12.3

7 replies

floris_1P
1Password Employee
1Password Employee
Mar 28, 2022 7:41 AM UTC

Git commit signing is on the roadmap! And fun fact: you can actually already sign your commits using your SSH keys in 1Password today, but major Git platforms don't show a 'verified' badge yet (GitHub, GitLab).

scottaw
scottawAuthor
Mar 29, 2022 12:26 AM UTC

Awesome, thanks!

Apr 7, 2022 8:14 PM UTC

While GitHub doesn't show it, I'd still like to be able to configure this so that when Github does show it, my commits will all be signed. What steps do I need to take?
ssh -vT git@github.com logs me into github just fine, but trying to sign a commit gives me this:
```
╰─ git commit --allow-empty --message="Testing SSH signing"
error: Load key "/var/folders/sf/57xvg5xj3_g4yp2j97qg7vpm0000gn/T//.git_signing_key_tmpMOHLqO": invalid format?

fatal: failed to write commit object
$ cat ~/.ssh/config
Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
$ cat ~/.gitconfig
[user]
email = XXX
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPYrxjtc7ngWOr6AVJSVCnoqANuLGIh/hW2xPB0ub+Z/
name = Felix Sargent
[commit]
gpgsign = true
[gpg]
program = /usr/local/MacGPG2/bin/gpg2
format = ssh
```

floris_1P
1Password Employee
1Password Employee
Apr 12, 2022 12:24 PM UTC

@fsargent Could you try removing gpg.program?

Apr 12, 2022 10:44 PM UTC

```
git commit --allow-empty --message="Testing SSH signing" -v
error: Load key "/var/folders/sf/57xvg5xj3_g4yp2j97qg7vpm0000gn/T//.git_signing_key_tmpV54Hsf": invalid format?

fatal: failed to write commit object

$ cat ~/.gitconfig

Please adapt and uncomment the following lines:

name = Felix Sargent

[user]
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPYrxjtc7ngWOr6AVJSVCnoqANuLGIh/hW2xPB0ub+Z/
name = Felix Sargent
[commit]
gpgsign = true
[gpg]
format = ssh
```

Apr 12, 2022 10:57 PM UTC

I got it to work after doing this:

$ export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock

floris_1P
1Password Employee
1Password Employee
Apr 13, 2022 8:58 AM UTC

@fsargent Ah yes, that makes sense, because Git commit signing is not linked to a certain host. Thanks for sharing!