Issue with git commit - fatal: bad config variable 'gpg.format' in file '/home/581/ns3783/.gitconfig' at line 10

I am having an issue with git commit.

I cloned a repo into my g/data folder but am not being able to commit to it :
error: unsupported value for gpg.format: ssh
fatal: bad config variable ‘gpg.format’ in file ‘/home/581/ns3783/.gitconfig’ at line 10

The line is question is the format =ssh and I checked and the version of git I have on gadi doesn’t support ssh. I don’t seem to be able to update the version.

Did someone encounter this problem before? What was your solution?

Thank you!

Hi @ribeirosantosn,

Note that this allows for signing commits which is a good idea.

The easiest way to get around this is to use the hh5 conda environment as it has a new enough version of git

$ which git
$ git --version
git version 2.39.1

Note that git v2.3.4 or greater is required.

There are also newer versions of git available in the system modules:

$ module avail git
----------------------------------------------------------------- /apps/Modules/modulefiles -----------------------------------------------------------------
git/2.24.1  git/2.37.3  git/2.39.1  git/2.39.2  

and though they should work (and I just tested and they seemed to), I’ve sometimes still had issues that I haven’t taken the time to track down.

You also have the option of removing the relevant lines from your .gitconfig:

        gpgsign = true
        format = ssh

Thank you. This solved the git version issue.

I ran into another issue afterwards:
error: Couldn’t load public key id_ed25519: No such file or directory?

In the end, I was required to remove those lines from my ~/.gitconfig to allow it to find the the correct location of the key.

1 Like