My repo settings can be seen in the below screenshot, I am looking for a way to set up GPG signing in Source Tree specifically. I have set it up to work via Git which Sourcetree leverages, but wondered if I am missing something?
For anyone looking for an answer here, there is a fairly simple way around this using the following instructions:
Open Git Bash.
gpg --list-secret-keys --keyid-format LONG command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
gpg --list-secret-keys --keyid-format LONG
Note: Some GPG installations on Linux may require you to use
gpg2 --list-keys --keyid-format LONG to view a list of your existing keys instead. In this case you will also need to configure Git to use
git config --global gpg.program gpg2.
From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is
gpg --list-secret-keys --keyid-format LONG /Users/hubot/.gnupg/secring.gpg ------------------------------------ sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10] uid Hubot ssb 4096R/42B317FD4BA89E7A 2016-03-10
To set your GPG signing key in Git, paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is
git config --global user.signingkey 3AA5C34371567BD2
To configure your Git client to sign commits by default for a local repository, in Git versions 2.0.0 and above, run
git config commit.gpgsign true. To sign all commits by default in any local repository on your computer, run
git config --global commit.gpgsign true.
To store your GPG key passphrase so you don't have to enter it every time you sign a commit, we recommend using the following tools:
You can also manually configure gpg-agent to save your GPG key passphrase, but this doesn't integrate with Mac OS Keychain like ssh-agent and requires more setup.
This method will result in a password prompt for your GPG key when committing via Sourcetree.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
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
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events