You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I've got SourceTree (on Mac) set up with GPG and I can sign my commits fine by manually selecting "Sign commit" from the commit settings dropdown, but this is tedious when you do a lot of commits. Is there an option hiding somewhere that I can use to force SourceTree to sign ALL of my commits, on either a global or repository level? (either would work for me)
I did try editing my global .gitconfig as well as my repository config with a new section:
[commit]
gpgsign = true
And this works fine when I git commit via the command line, but SourceTree isn't even able to commit at all with this settings since it tries to open /dev/tty for some reason (even though my pinentry program is set to pinentry-mac).
Any help would be appreciated!
To be able to sign commits by default, in your ~/.gitconfig, add:
[user] signingkey = ........ [commit] gpgsign = true [gpg] program = /Applications/SourceTree.app/Contents/Resources/bin/stgpg.sh
Check stgpg.sh to see why this resolves the issue with /dev/tty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the stupid question but... in `signingkey` what should I put? The fingerprint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use the key ID; its 8 hexadecimal characters, which I think are (always?) the last 8 characters of the key fingerprint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On my Mac, with Homebrew installed gpg and pinentry-mac, the following git configuration was sufficient:
[user]
name = My Name
email = xxxxx@users.noreply.github.com
signingkey = XXXXXXX
[credential]
helper = osxkeychain
[commit]
gpgsign = true
[gpg]
program = /usr/local/bin/gpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.