Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why does source tree look for gpg keys while I haven't configured for signing?

I downloaded sourcetree app on my mac and added a local git repo to it. Whenever I try to stash something or commit something, sourcetree throws gpg related errors. An example error is as below.

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree stash save test-stash 
/Applications/SourceTree.app/Contents/Resources/bin/gpg: line 2: gpg2: command not found
error: gpg failed to sign the data
Cannot save the current index state
Completed with errors, see above

I am unable to figure out the cause for this error. As far as I remember, I have not configured either the project or sourcetree app for any sort of signing.

It'd be of a great help if you could help me with troubleshooting this issue.

like image 789
Goje87 Avatar asked Oct 22 '25 06:10

Goje87


1 Answers

Even if I try committing from command line, it asks for gpg keys.

After a lot more search on internet I found the root cause. It was due to one of the dotfiles that set the global config for signing commits in ~/.gitconfig as true. Therefore, I set the config back to false using following command.

$ git config --global commit.gpgsign false

Phew! The issue is resolved now...

like image 112
Goje87 Avatar answered Oct 23 '25 22:10

Goje87



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!