![]() However, these help documents don’t take into account the usage of SourceTree and you will need to do some extra steps to get this working.įor future reference, I’ll describe the steps I had to take below.įirst thing you want to do is install Git, the Git Extensions and if you haven’t already, SourceTree.Īfter doing so you can start Git Bash from the Windows context menu in Windows Explorer.īy default your SSH keys are stored in the ~/.ssh directory. In retrospect I think the Atlassian help page is the most useful for helping out with local Git servers. Also Atlassian has provided an extensive help document with a couple of steps. Lucky for me there’s a nice tutorial on how to create SSH keys on the GitHub help pages. Once you know how to do this it’s quite easy, but till 2 days ago I didn’t had a clue. Because I’m used to using these tools, I really wanted to use them on my day job also.īecause we chose to use SSH keys as a validation mechanism I had to create one. I’ve already had the pleasure to use GitHub and BitBucket in the past, which works like a charm with tools like GitHub for Windows and SourceTree. The past couple of days I’ve had the pleasure to start using a Git server as the new version control system at my customer. Try to commit after updating the above options.Connecting to a Git server on your Windows machine No need to download any other software for signing your commits. ![]() $ git config -global commit.signingkey YOUR_KEY_HERE For example, $ git config -global commit.gpgsign true If you want to sign every repository, then add a -global flag to above commands. Then, execute the following command $ git config commit.signingkey YOUR_KEY_HERE Check for existing keys by using the following command $ gpg -list-secret-keys -keyid-format LONGįor example, if your output is /Users/hubot/.gnupg/secring.gpg You need to have a GPG Signing key in order to sign the commit. I'll update the image when I get sufficient reputation points :) ).Įnter the following commands $ git config commit.gpgsign true (I don't have enough reputation points to post an image. Open Sourcetree and click the Terminal button on the top-right corner. If you have not created GPG Key, then head to github's tutorial on GPG keys here 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Īpart from that, you can use every other features sourcetree have (push, pull, fetch, merge etc.) as usual.Įdit : This drawback has been solved by ahmad's answer. 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.Įvery time you commit. If you want to sign every commits in EVERY repository use git config -global commit.gpgsign true instead. ![]() Press ctrl+, go to git tab and click Use System Git Step 3 Configure git to sign every commit (optional)įrom powershell (or you can use the built-in terminal from terminal icon in sourcetree).Įnter git config commit.gpgsign true - this will configure git to automatically sign all commits in CURRENT repository. (If you haven't already) Step 2 Make sure sourcetree use system's git 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) Step 1 Install git shell for Windows
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |