![]() This will set it up globally (i.e., for every project) but you can also set it on a per-project basis by accessing the "Settings" view in the sidebar. Tick the "Sign Commits" box if you would like to sign every commit by default. You can then choose a GPG key by accessing the dropdown menu. You'll just need to head over to the "Git Config" tab in the "Preferences" window and locate gpg.exe (as mentioned in the previous step). In Tower, setting this up is very straightforward. Indicate where the GPG binary is locatedĪgain, we can do this "the easy way" - with Tower, our easy to use Git client - or "the not-so-easy way", also known as the Command Line.Just to be sure, type the following in Windows Powershell: $ where.exe gpgĬopy the output and move on to the next and final step! Locating gpg.exe 4. Following our method, it should be here:Ĭ:\Program Files (x86)\GnuPG\bin\gpg.exe. Now we just need to tell Git where gpg.exe is located for things to work seamlessly. To finish things off, you will need to enter (and re-enter) a secure passphrase to protect the key you've just generated. As mentioned in option A, it should match the one in your Git configuration and in your GitHub account. ![]() You will then be prompted to type your name and email address. We suggest you create a RSA key that is 4,096 bits long (with no expiry date). On to the next step! Option B: Command Lineįire up Windows Powershell and run the following command: $ gpg -full-generate-key Now would be a good time to create a backup of this key and store it somewhere safe. We're done! That wasn't so hard, was it? ? In this example, we will also remove the expiration date. Kleopatra - Entering Name and Emailīefore clicking "Create", click on "Advanced Settings" and choose a RSA key that is 4,096 bits long. We also advise you to tick the "Protect the generated key with a passphrase." box. The first screen will ask you to enter your name and email address (it should match the one in your Git configuration and in your GitHub account). Let's click on "File > New Key Pair" and generate a new Open GPG key pair. If not, you can launch it by visiting the Start menu. Option A: KleopatraĪfter installing Gpg4win, Kleopatra should already be running. If you go with the latter, Windows Powershell (that comes with Windows) is all you'll need. We can do this "the easy way" (with Kleopatra, which presents a Graphical User Interface) or "the not-so-easy way" (by accessing the Command Line). ![]() Let's generate a new one for signing commits and tags. If you're reading this, chances are you don't have a GPG key yet. Both will come in handy, as we will need them to create (or import) an OpenPGP key pair. To kick things off, download and install Gpg4win from the official website.īy default, Gpg4win comes with a set of GPG command line tools and will install Kleopatra.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |