0

I'm trying to sign Git commits with my ed25519 public ssh key and push them to GitHub.

When I run git commit -S -m "initial commit" Git returns:

error: Load key "/tmp/.git_signing_key_tmpJBIzAj": invalid format?

fatal: failed to write commit object

Tried using a RSA 3072 keypair, generated with ssh-keygen, but I get the same results. Downgrading to OpenSSH_8.8p1 (Git release notes specifically said that 8.8 worked) and generating a new keypair dosen't seem to work either.

My global ~/.gitconfig looks something like this:

[user]
       email = my@email.com
       name = IceDops
       signingKey = ssh-ed25519 AAAA(...)
[commit]
       gpgsign = true
[gpg]
       format = ssh

Running Git 2.37.3 and OpenSSH_9.0p1 on Arch Linux

IceDops
  • 9
  • 2
  • `user.signingKey` is either a path to the public key file or the very public key with `key::` prefix. To fix: `git config --global user.signingKey 'key::ssh-ed25519 AAAA…'` . See also [git help config](https://git-scm.com/docs/git-config#Documentation/git-config.txt-usersigningKey). The private key needs to be available via `ssh-agent`. – phd Sep 07 '22 at 19:37

0 Answers0