Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree cannot find gpg1: error: cannot run gpg1: No such file or directory

Qi Luk May 18, 2017

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

 

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2017

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:

  • Version of SourceTree you're using
  • Version of Git
  • Was this working before and just stopped, or is it the first time you're configuring this?

Best regards,

Ana

Qi Luk May 24, 2017

>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.

 

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events