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:
>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
* I'm using macOS SourceTree Version 2.4 (89)
* It is the first time I tried to commit and sign in SourceTree.
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event