gpg signing key

Options
scottaw
scottaw
Community Member
edited May 2022 in SSH

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

Comments

  • floris_1P
    edited March 2022
    Options

    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
    scottaw
    Community Member
    Options

    Awesome, thanks!

  • fsargent
    fsargent
    Community Member
    edited April 2022
    Options

    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
    
  • @fsargent Could you try removing gpg.program?

  • fsargent
    fsargent
    Community Member
    Options
    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
    
  • fsargent
    fsargent
    Community Member
    edited April 2022
    Options

    I got it to work after doing this:

    $ export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
    
  • @fsargent Ah yes, that makes sense, because Git commit signing is not linked to a certain host. Thanks for sharing!

This discussion has been closed.