FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.41k stars 637 forks source link

error: cannot run gpg: No such file or directory #1535

Closed joepavitt closed 1 year ago

joepavitt commented 1 year ago

I've recently pulled from main on a repository that I work in every day and now I am seeing the following error within ungit:

error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
error: cannot run gpg: No such file or directory
BUG: gpg-interface.c:284: bad signature '-----BEGIN SSH SIGNATURE-----
<SSH KEY REMOVED FOR POSITING HERE>
-----END SSH SIGNATURE-----
'

I do not gpg sign my commits, nor have I ever, so am unsure why this is running, and consequently tripping now? I am able to run status, add and commit from a terminal without any issue.

joepavitt commented 1 year ago

I have now installed gpg and now just get the

BUG: gpg-interface.c:284: bad signature '-----BEGIN SSH SIGNATURE-----
<SSH KEY REMOVED FOR POSITING HERE>
-----END SSH SIGNATURE-----
'

message

joepavitt commented 1 year ago

Have noticed the Currently, Ungit DOES NOT support GPG authentication! While git allows robust programmatic authentication via [credential-helper](https://help.github.com/articles/telling-git-about-your-gpg-key/), I could not find an easy way to do something equivalent with GPG. in the ungit README.

Unfortunately, I'm working in an open source project, and another contributor has used GPG to sign their commits. This is out of my control, and I can reproduce the error in a terminal with:

git verify-commit 3970242792a9dce99267bff0486eba1c4291eec2

Or any commit message contributed by that author. As I am not using the GPG auth myself, I'm hoping there is a workaround to continue using ungit?

hardillb commented 1 year ago

Just to be clear, lots of the commits are GPG signed, the problem is that we have a commit signed by a SSH key, not a GPG key.

hardillb commented 1 year ago

Fix appears to be upgrade git to a version (newer than 2.34.0) that supports SSH key signing.

campersau commented 1 year ago

Hm maybe we should update the readme then? https://github.com/FredrikNoren/ungit/blob/3eb347b0aa4134ac1e6bcd3a1988ee041ee7b542/README.md?plain=1#L29

joepavitt commented 1 year ago

Hm maybe we should update the readme then?

PR opened https://github.com/FredrikNoren/ungit/pull/1536