Skip to main content
July 5, 2022
Question

SSH Commit Signing

  • July 5, 2022
  • 13 replies
  • 2152 views

I've stated signing my git commits using SSH.

However this only seems to work with setting the SSH_AUTH_SOCK env variable. For some reasons I cannot set that variable everywhere and have to rely on host specific IdentityAgent configuration.

This is the error
```
git commit -m"test"
error: Load key "/var/folders/z//T//.git_signing_key": invalid format?

fatal: failed to write commit object
```

Prepending the command with SSH_AUTH_SOCK=~/.1password/agent.sock git commit -m"test" works.

This issue also applies to VSCode.

As per the https://git-scm.com/docs/git-config#Documentation/git-config.txt-gpgltformatgtprogram, to used program is ssh-keygen. I guess it doesn't read ssh config files or at least wouldn't be aware of a host to use.

Question: Does 1Password provide a binary compatible to ssh-keygen that I could set as gpg.ssh.program in my gitconfig?


1Password Version: 8.7.3
Extension Version: Not Provided
OS Version: macOS
Browser:_ Not Provided

13 replies

January 5, 2023

I run into it when signing commits. Before I realized the issue was failed signing, I ran the commit command using sudo, which technically worked, though I think it probably changes things in the .git directory, and it's probably only working that way since it would use a different user's global git config that didn't have commit signing enabled.

Jack_P_1P
1Password Employee
January 5, 2023

Hey @spocklogical:

Thanks for following up. In that case, I'd like to ask you to create a diagnostics report from your device:

Sending Diagnostics Reports (Mac)

Attach the diagnostics to an email message addressed to support+forum@1password.com.

With your email please include:

You should receive an automated reply from our BitBot assistant with a Support ID number. Please post that number here. Thanks very much!

January 6, 2023

Just did it. The id number is: [#ZNW-59812-231]
Thinking more about it, it might be possible 1password gets more forcefully suspended on my dev computer since I keep running out of memory, don't know if that might affect it's ability to prompt for confirmation when signing commits.