I use /usr/local/bin/gpg1 to sign my Git commits. It's configured as
[gpg] program = gpg1
in ~/.gitconfig and works correctly for command-line git. But when commiting in SourceTree, it fails with an error saying it cannot find gpg1:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/87/wkgwm0754tn9csz8295qjmmc000bxz/T/SourceTreeTemp.5qp4T8 error: cannot run gpg1: No such file or directory error: gpg failed to sign the data fatal: failed to write commit object Completed with errors, see above
Hi Qi Luk, can you confirm you have turned on GPG signing in SourceTree's Repository > Repository Settings > Security tab?
And also, can you confirm you have the actual Commit Options/Sign Commit enabled? Without that checked SourceTree will not attempt to sign the commit. You can visit Setup GPG to sign commits within SourceTree for more information.
If the issue is still occurring, please let us know:
Best regards,
Ana
>can you confirm you have turned on GPG signing in SourceTree's Repository > Repository Settings > Security tab?
I did have that turned on.
> ... you have the actual Commit Options/Sign Commit enabled? ...
I do. In my $HOME/.gitconfig I have
[commit] gpgsign = true [gpg] program = gpg1
and my command-line git has always been able to commit and sign the commits.
❯ which gpg1 /usr/local/bin/gpg1 ❯ gpg1 --version gpg (GnuPG) 1.4.21 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: ~/.gnupg Supported algorithms: Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2
Additional info:
* I'm using macOS SourceTree Version 2.4 (89)
* Git: https://www.dropbox.com/s/i6dm7qs1368efkc/Screenshot%202017-05-24%2009.04.05.png?dl=0
* It is the first time I tried to commit and sign in SourceTree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.