Protect what matters ā even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Anonymous
4 years agoSSH Commit Signing
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/
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
- Anonymous
floris_1P Great to see your version of
op-ssh-signlaunch!One thing that seems a bit odd is when 1password is not started (or active)?
It fails with this cryptic error message:
```
ā git commit -m"test"
error: Error: AppError { error: could not connect to agentCaused by:
std::io::error::Error, location: Location { file: "ssh/op-ssh-sign/src/utils.rs", line: 27, col: 14 } }fatal: failed to write commit object
``` - floris_1P
1Password Team
We are looking into shipping something like that with the 1Password app. And what you're using now is exactly what I was about to suggest.
- Anonymous
In the meantime I have created a
gpg-ssh-programhelper script myself:```sh
!/bin/sh
SSH_AUTH_SOCK=~/.1password/agent.sock ssh-keygen "$@"
```And then as git config:
config
[gpg "ssh"]
program = /Users/<username>/<path-to-script>/gpg-ssh-program