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
Comments
-
Signing commits with SSH keys was introduced in Git 2.34, could you check your Git version:
git --version
?0 -
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
0 -
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.
0 -
Just checked. It's already in my private vault
0 -
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
.0 -
When running
ssh -T git@github.com
the only message i get isgit@github.com: Permission denied (publickey).
but when running
ssh -vT git@github.com
a connection can be madeOpenSSH_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).
0 -
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
0 -
You know what...I take this back ☺️ Different issue entirely!
https://gitlab.com/gitlab-org/gitlab/-/issues/343879
I'll go hide in a corner now. Sorry for the extra noise!
0