Last active
May 1, 2026 14:38
-
Star
(256)
You must be signed in to star a gist -
Fork
(51)
You must be signed in to fork a gist
-
-
Save mort3za/ad545d47dd2b54970c102fe39912f305 to your computer and use it in GitHub Desktop.
Revisions
-
mort3za revised this gist
Jun 5, 2019 . 1 changed file with 7 additions and 7 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,19 +1,19 @@ # Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) gpg --gen-key # maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` # check current keys: gpg --list-secret-keys --keyid-format LONG # See your gpg public key: gpg --armor --export YOUR_KEY_ID # YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) # Set a gpg key for git: git config --global user.signingkey your_key_id # To sign a single commit: git commit -S -a -m "Test a signed commit" # Auto-sign all commits globaly git config --global commit.gpgsign true -
mort3za revised this gist
May 27, 2019 . 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 @@ -7,7 +7,7 @@ gpg --list-secret-keys --keyid-format LONG # export public key in gpg: gpg --armor --export your_key_id # your_key_id is the HASH id in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) # set a pgp key for git: git config --global user.signingkey your_key_id -
mort3za revised this gist
May 27, 2019 . 1 changed file with 0 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 @@ -5,9 +5,6 @@ gpg --gen-key # check current keys: gpg --list-secret-keys --keyid-format LONG # export public key in gpg: gpg --armor --export your_key_id # your_key_id is the HASH id in front of `sec` in previous command. -
mort3za revised this gist
Jan 13, 2018 . 1 changed file with 4 additions and 4 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,3 +1,7 @@ # generate a new pgp key: (better to use gpg2 instead of gpg) gpg --gen-key # maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` # check current keys: gpg --list-secret-keys --keyid-format LONG @@ -8,10 +12,6 @@ gpg --export-secret-key -a "your_username" gpg --armor --export your_key_id # your_key_id is the HASH id in front of `sec` in previous command. # set a pgp key for git: git config --global user.signingkey your_key_id -
mort3za revised this gist
Jan 13, 2018 . 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 @@ -6,6 +6,7 @@ gpg --export-secret-key -a "your_username" # export public key in gpg: gpg --armor --export your_key_id # your_key_id is the HASH id in front of `sec` in previous command. # generate a new pgp key: gpg --gen-key -
mort3za created this gist
Oct 11, 2017 .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,21 @@ # check current keys: gpg --list-secret-keys --keyid-format LONG # export private key in gpg: gpg --export-secret-key -a "your_username" # export public key in gpg: gpg --armor --export your_key_id # generate a new pgp key: gpg --gen-key # maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` # set a pgp key for git: git config --global user.signingkey your_key_id # sign your single commit: git commit -S -a -m "Test a signed commit" # auto sign your commits globaly git config --global commit.gpgsign true