Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

Former Member's avatar
Former Member
3 years ago

Signing git commits issue

I wanted to try the new "sign git commits" feature and did everything exactly as described in the docs

But when i try to commit something now im getting the following error


error: unsupported value for gpg.format: ssh
fatal: bad config variable 'gpg.format' in file 'C:/Users/fabia/.gitconfig' at line 15

upon looking at the .gitconfig file everything looks fine

[gpg]
format = ssh
[gpg "ssh"]
program = C:\\Users\\fabia\\AppData\\Local\\1Password\\app\\8\\op-ssh-sign.exe
[commit]
gpgsign = true

does this have something to do with the op-ssh-sign.exe?


1Password Version: 8.9.5
Extension Version: Not Provided
OS Version: Windows 11 Pro (22000.856)
Browser:_ Not Provided

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    Signing commits with SSH keys was introduced in Git 2.34, could you check your Git version: git --version?

  • Former Member's avatar
    Former Member

    i had an older version and just updated git to 2.37.3

    the error above disappeared but a new one appeared
    ```
    error: Error: AppError { error: could not authenticate with ssh agent, location: Location { file: "ssh\op-ssh-sign\src\ops.rs", line: 95, col: 37 } }

    fatal: failed to write commit object
    ```

  • Former Member's avatar
    Former Member

    Hi @Fabian9799, glad to hear that you're one step closer! As for the new error you're seeing, please make sure that the key is located within your Private vault.

  • Former Member's avatar
    Former Member

    Just checked. It's already in my private vault

  • Former Member's avatar
    Former Member

    Hi @Fabian9799 thanks for confirming that. Can you double check if you can simply authenticate with SSH? For example, if you're set up with GitHub:


    ssh -T git@github.com

    Assuming that works correctly, do you see anything appear in the 1Password logs when you perform the Git command? On Windows: %LOCALAPPDATA%/1Password/logs.

  • Former Member's avatar
    Former Member

    When running ssh -T git@github.com the only message i get is

    git@github.com: Permission denied (publickey).

    but when running ssh -vT git@github.com a connection can be made

    OpenSSH_9.0p1, OpenSSL 1.1.1q 5 Jul 2022
    debug1: Reading configuration data /c/Users/fabia/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Connecting to github.com [140.82.121.4] port 22.
    debug1: Connection established.
    ...
    debug1: No more authentication methods to try.
    git@github.com: Permission denied (publickey).

  • Former Member's avatar
    Former Member

    FWIW, I am experiencing the same thing, even though I can log into a local gitlab instance.

    ```
    ❯ ssh -T git@gitlab.jinkit.com
    Warning: Permanently added 'gitlab.jinkit.com' (ED25519) to the list of known hosts.
    Welcome to GitLab, @v1k0d3n!

    ❯ git commit -s -m "update README"
    error: Error: AppError { error: could not authenticate with ssh agent, location: Location { file: "ssh/op-ssh-sign/src/ops.rs", line: 95, col: 37 } }

    fatal: failed to write commit object
    ```