Revisions
-
ankurk91 revised this gist
Sep 15, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ ``` # Ubuntu sudo apt-get install gpa seahorse # MacOS with https://brew.sh/ brew install gpg ``` * Generate a new gpg [key](https://help.github.com/articles/generating-a-new-gpg-key/) @@ -30,7 +30,7 @@ uid User Name <[email protected]> ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_LONG_KEY``` from above (without `<` and `>`) * **Export this (public) key to a text file** ``` gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt @@ -39,7 +39,7 @@ gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt * **Add this key to GitHub** * Login to Github and goto profile [settings](https://github.com/settings/keys) * Click ```New GPG Key``` and paste the contents of ```gpg-key.txt``` file then save * **[Tell](https://help.github.com/articles/telling-git-about-your-gpg-key/) git client to auto sign your future commits** * Use the long key from above in next command -
ankurk91 revised this gist
Aug 8, 2018 . 1 changed file with 8 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,11 @@ * Do you have an Github account ? If not create one. * **Install required tools** * Latest [Git Client](https://git-scm.com/downloads) * gpg tools ``` # Ubuntu sudo apt-get install gpa seahorse # MacOS brew install gpg ``` * Generate a new gpg [key](https://help.github.com/articles/generating-a-new-gpg-key/) @@ -30,7 +30,7 @@ uid User Name <[email protected]> ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_LONG_KEY``` from above (without `<` and `>` sign) * **Export this (public) key to a text file** ``` gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt @@ -41,23 +41,10 @@ gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt * Login to Github and goto profile [settings](https://github.com/settings/keys) * Click ```New GPG Key``` and paste the content of ```gpg-key.txt``` file then save * **[Tell](https://help.github.com/articles/telling-git-about-your-gpg-key/) git client to auto sign your future commits** * Use the long key from above in next command ``` git config --global user.signingkey <PASTE_LONG_KEY_HERE> git config --global commit.gpgsign true ``` * You are done, next time when you commit changes; gpg will ask you the passphrase. @@ -92,8 +79,8 @@ Type: save ``` ### Reference links * https://help.github.com/articles/signing-commits-with-gpg/ * http://nishanttotla.com/blog/signing-git-commits-gpg/ * https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work * https://news.ycombinator.com/item?id=7792026 -
ankurk91 revised this gist
Aug 8, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -103,4 +103,4 @@ save * https://help.ubuntu.com/community/GnuPrivacyGuardHowto * https://medium.com/@timmywil/sign-your-commits-on-github-with-gpg-566f07762a43#.aovevj80y * https://blog.erincall.com/p/signing-your-git-commits-with-gpg * https://dev.to/agrinman/spoof-a-commit-on-github-from-anyone-4gf4 -
ankurk91 revised this gist
Sep 27, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,6 @@ sub 4096R/EB61969F 2016-08-11 [expires: 2017-08-11] ``` git config --global user.signingKey <PASTE_SHORT_KEY_HERE> git config --global commit.gpgsign true ``` * You are done, next time when you commit changes; gpg will ask you the passphrase. -
ankurk91 revised this gist
Feb 11, 2017 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_LONG_KEY``` from above * **Export this (public) key to a text file** ``` gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt ``` @@ -42,7 +42,7 @@ gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt * Click ```New GPG Key``` and paste the content of ```gpg-key.txt``` file then save * **Tell git client to auto sign your future commits** * Run this command ``` gpg --list-keys @@ -63,7 +63,7 @@ git config --global tag.gpgsign true ``` * You are done, next time when you commit changes; gpg will ask you the passphrase. ### Make gpg remember your passphrase (tricky) To make it remember your password, you can use ```gpg-agent``` Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines @@ -102,4 +102,6 @@ save * http://stackoverflow.com/questions/10161198/is-there-a-way-to-autosign-commits-in-git-with-a-gpg-key * http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html * https://help.ubuntu.com/community/GnuPrivacyGuardHowto * https://medium.com/@timmywil/sign-your-commits-on-github-with-gpg-566f07762a43#.aovevj80y * https://blog.erincall.com/p/signing-your-git-commits-with-gpg -
ankurk91 revised this gist
Oct 15, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Github : Signing commits using GPG (Ubuntu/Mac) :closed_lock_with_key: * Do you have an Github account ? If not create one. * **Install required tools** * Latest [Git Client](https://git-scm.com/downloads) * gpg tools @@ -86,8 +86,8 @@ At the gpg prompt type: ``` passwd ``` Type in the current passphrase when prompted<br> Type in the new passphrase twice when prompted<br> Type: ``` save -
ankurk91 revised this gist
Oct 6, 2016 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,9 +61,9 @@ git config --global user.signingKey <PASTE_SHORT_KEY_HERE> git config --global commit.gpgsign true git config --global tag.gpgsign true ``` * You are done, next time when you commit changes; gpg will ask you the passphrase. ### Make gpg remember your passphrase To make it remember your password, you can use ```gpg-agent``` Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines @@ -78,16 +78,16 @@ If gpg-agent is not running you can start it with this command gpg-agent --daemon ``` ### Change your key passphrase ``` gpg --edit-key <PASTE_YOUR_KEY_ID_HERE> ``` At the gpg prompt type: ``` passwd ``` Type in the current passphrase when prompted Type in the new passphrase twice when prompted Type: ``` save -
ankurk91 revised this gist
Oct 6, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## Github : Signing commits using GPG (Ubuntu/Mac) :closed_lock_with_key: * You have an account on Github already ? If not create one. * **Install required tools** @@ -61,6 +61,7 @@ git config --global user.signingKey <PASTE_SHORT_KEY_HERE> git config --global commit.gpgsign true git config --global tag.gpgsign true ``` * You are done, next time when you commit changes gpg will ask you the password you gave above. ### Make gpg remember your password To make it remember your password, you can use ```gpg-agent``` -
ankurk91 revised this gist
Oct 2, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Github : Signing commits using GPG (Ubuntu/Mac) * You have an account on Github already ? If not create one. * **Install required tools** * Latest [Git Client](https://git-scm.com/downloads) * gpg tools @@ -14,7 +14,7 @@ brew install gpg ``` gpg --gen-key ``` * Answer the questions asked > Note: When asked to enter your email address, ensure that you enter the verified email address for your GitHub account. * **List generated key** @@ -63,7 +63,7 @@ git config --global tag.gpgsign true ``` ### Make gpg remember your password To make it remember your password, you can use ```gpg-agent``` Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines ``` -
ankurk91 revised this gist
Sep 20, 2016 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -77,6 +77,21 @@ If gpg-agent is not running you can start it with this command gpg-agent --daemon ``` ### Change your key Passphrase ``` gpg --edit-key <PASTE_YOUR_KEY_ID_HERE> ``` At the gpg prompt type: ``` passwd ``` Type the current passphrase when prompted Type the new passphrase twice when prompted Type: ``` save ``` ### Reference Links * https://help.github.com/categories/gpg/ * http://nishanttotla.com/blog/signing-git-commits-gpg/ @@ -85,4 +100,5 @@ gpg-agent --daemon * https://overflow.no/blog/2016/08/11/signed-commits-with-gpg-git-and-github-on-linux/ * http://stackoverflow.com/questions/10161198/is-there-a-way-to-autosign-commits-in-git-with-a-gpg-key * http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html * https://help.ubuntu.com/community/GnuPrivacyGuardHowto -
ankurk91 revised this gist
Sep 20, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,15 +63,15 @@ git config --global tag.gpgsign true ``` ### Make gpg remember your password To make it remember your password you can use ```gpg-agent``` Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines ``` default-cache-ttl 28800 max-cache-ttl 28800 ``` *28800 seconds means 8 hours* If gpg-agent is not running you can start it with this command ``` gpg-agent --daemon -
ankurk91 revised this gist
Sep 20, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,7 @@ Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines default-cache-ttl 28800 max-cache-ttl 28800 ``` *28800 seconds means 8 hours* If gpg-agent is not running you can start it with this command ``` gpg-agent --daemon -
ankurk91 revised this gist
Sep 20, 2016 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,6 +62,20 @@ git config --global commit.gpgsign true git config --global tag.gpgsign true ``` ### Make gpg remember your password gpg will ask for your key password on each time you make git commit, to make it remember your password you can use ```gpg-agent``` Edit your ```~/.gnupg/gpg-agent.conf``` file and paste these lines ``` default-cache-ttl 28800 max-cache-ttl 28800 ``` __28800 seconds means 8 hours__ If gpg-agent is not running you can start it with this command ``` gpg-agent --daemon ``` ### Reference Links * https://help.github.com/categories/gpg/ -
ankurk91 revised this gist
Sep 20, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ * You have an account on Github already ? If not ceate one. * **Install required tools** * Latest [Git Client](https://git-scm.com/downloads) * gpg tools ``` # Ubuntu sudo apt-get install gpa seahorse @@ -55,7 +57,7 @@ sub 4096R/EB61969F 2016-08-11 [expires: 2017-08-11] ``` * Copy the short key from above and use this in command below ``` git config --global user.signingKey <PASTE_SHORT_KEY_HERE> git config --global commit.gpgsign true git config --global tag.gpgsign true ``` -
ankurk91 renamed this gist
Aug 27, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,4 +68,5 @@ git config --global tag.gpgsign true * https://news.ycombinator.com/item?id=7792026 * https://overflow.no/blog/2016/08/11/signed-commits-with-gpg-git-and-github-on-linux/ * http://stackoverflow.com/questions/10161198/is-there-a-way-to-autosign-commits-in-git-with-a-gpg-key * http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html -
ankurk91 revised this gist
Aug 27, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ gpg --list-keys /home/username/.gnupg/pubring.gpg ------------------------------- pub 4096R/<COPY_SHORT_KEY> 2016-08-11 [expires: 2018-08-11] uid Your Name <[email protected]> sub 4096R/EB61969F 2016-08-11 [expires: 2017-08-11] ``` * Copy the short key from above and use this in command below -
ankurk91 revised this gist
Aug 17, 2016 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,3 +60,12 @@ git config --global commit.gpgsign true git config --global tag.gpgsign true ``` ### Reference Links * https://help.github.com/categories/gpg/ * http://nishanttotla.com/blog/signing-git-commits-gpg/ * https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work * https://news.ycombinator.com/item?id=7792026 * https://overflow.no/blog/2016/08/11/signed-commits-with-gpg-git-and-github-on-linux/ * http://stackoverflow.com/questions/10161198/is-there-a-way-to-autosign-commits-in-git-with-a-gpg-key -
ankurk91 revised this gist
Aug 17, 2016 . 1 changed file with 23 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## Github : Signing commits using GPG (Ubuntu/Mac) * You have an account on Github already ? If not ceate one. * **Install required tools** @@ -23,22 +23,39 @@ gpg --list-secret-keys --keyid-format LONG ``` /home/username/.gnupg/secring.gpg ------------------------------- sec 4096R/<COPY_LONG_KEY> 2016-08-11 [expires: 2018-08-11] uid User Name <[email protected]> ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_LONG_KEY``` from above * **Export this key to a text file** ``` gpg --armor --export <PASTE_LONG_KEY_HERE> > gpg-key.txt ``` * Above command will create a new txt file ```gpg-key.txt``` * **Add this key to GitHub** * Login to Github and goto profile [settings](https://github.com/settings/keys) * Click ```New GPG Key``` and paste the content of ```gpg-key.txt``` file then save * **Tell git to auto sign your future commits** * Run this command ``` gpg --list-keys ``` * Above command should return like this - ``` /home/username/.gnupg/pubring.gpg ------------------------------- pub 4096R/<COPY_SHORT_KEY> 2016-08-11 [expires: 2018-08-11] uid Austin Ankur <[email protected]> sub 4096R/EB61969F 2016-08-11 [expires: 2017-08-11] ``` * Copy the short key from above and use this in command below ``` git config --global user.signingkey <PASTE_SHORT_KEY_HERE> git config --global commit.gpgsign true git config --global tag.gpgsign true ``` -
ankurk91 revised this gist
Aug 17, 2016 . 1 changed file with 18 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,12 @@ ## Github : Signing commits using GPG (Ubuntu) * You have an account on Github already ? If not ceate one. * **Install required tools** ``` # Ubuntu sudo apt-get install gpa seahorse # Mac brew install gpg ``` * Generate a new gpg [key](https://help.github.com/articles/generating-a-new-gpg-key/) ``` @@ -12,7 +15,7 @@ gpg --gen-key * Answer the question asked > Note: When asked to enter your email address, ensure that you enter the verified email address for your GitHub account. * **List generated key** ``` gpg --list-secret-keys --keyid-format LONG ``` @@ -26,8 +29,17 @@ ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_THIS_KEY``` from above * **Export this key** ``` gpg --armor --export <PASTE_KEY_HERE> > gpg-key.txt ``` * Above command will create a new txt file ```gpg-key.txt``` * **Tell git to auto sign your future commits** ``` git config --global user.signingkey <KEY_HERE> git config --global commit.gpgsign true git config --global tag.gpgsign true ``` -
ankurk91 created this gist
Aug 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ ## Prepare system * You have an account on Github already ? If not ceate one. * *Install required tools* ``` sudo apt-get install git sudo apt-get install gpa seahorse ``` * Generate a new gpg [key](https://help.github.com/articles/generating-a-new-gpg-key/) ``` gpg --gen-key ``` * Answer the question asked > Note: When asked to enter your email address, ensure that you enter the verified email address for your GitHub account. * *List generated key* ``` gpg --list-secret-keys --keyid-format LONG ``` * Above command should return like this ``` /home/username/.gnupg/secring.gpg ------------------------------- sec 4096R/<COPY_THIS_KEY> 2016-08-11 [expires: 2018-08-11] uid User Name <[email protected]> ssb 4096R/62E5B29EEA7145E 2016-08-11 ``` * Note down your key ```COPY_THIS_KEY``` from above * *Export this key* ``` gpg --armor --export <PASTE_KEY_HERE> > gpg-key.txt ``` * Above command will create a new txt file ```gpg-key.txt```