Currently (13th Feb 2018) Sourcetree supports commit signing in Mac version only.
And from this question (since 2013) commit signing still isn't available in Windows version.
So is it possible to sign commit in Windows version of sourcetree?
Commit filesClick Commit in the toolbar. Select the files to commit in the Pending files panel. Enter a commit message. Click Commit at the bottom of the window.
"push" = "send a set of commits and the objects they point to to a remote"; "pull" = "copy a set of commits and referred objects from a remote"; "commit" = "create a new snapshot of the project, pointing to updated directories, files, etc. and one or more parent commits"...
I had a similar issue & I followed @theminer3746 answer to set it up.
I was able to fix the no tty error & have a dialog to enter the password using the following steps
([Your homedir]/.gnupg/secring.gpg)
git config --global gpg.program "c:\Program Files (x86)\GnuPG\bin\gpg.exe"
Well, the answer is yes and no.
The work around I've figured out is as follow (I assumed that you've already the GPG key setup, if not follow github's tutorial on how to set it up)
(If you haven't already)
Press ctrl+,
go to git tab and click Use System Git
From powershell (or you can use the built-in terminal from terminal
icon in sourcetree).
Enter git config commit.gpgsign true
- this will configure git to automatically sign all commits in CURRENT repository.
If you want to sign every commits in EVERY repository use git config --global commit.gpgsign true
instead.
Note If you choose to skip step 3 make sure to add -S
every time you commit (git commit -S
) or your commit won't be sign.
Of course this way have a drawback.
Every time you commit. You have to do it in terminal. If you try to commit using sourcetree's commit button an error will occur
gpg: cannot open tty `no tty': No such file or directory
error: gpg failed to sign the data
fatal: failed to write commit object
Apart from that, you can use every other features sourcetree have (push, pull, fetch, merge etc.) as usual.
Edit : This drawback has been solved by ahmad's answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With