Skip to main content
scottaw
March 27, 2022
Question

gpg signing key

  • March 27, 2022
  • 7 replies
  • 2474 views

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
March 28, 2022

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
March 29, 2022

Awesome, thanks!

April 7, 2022

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
April 12, 2022

@fsargent Could you try removing gpg.program?

April 12, 2022

```
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
```

April 12, 2022

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
April 13, 2022

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