Github
SSH Key
Generate key
Add private key to ssh-client
Install xclip
Copy generated file to clipboard (CTRL + C)
Open Github and Add the ssh key
Github Shortcuts
Do you have a Github account?
If not, create one.
Install the required tools
Latest Git Client
Install GPG Tools
Generate a new GPG 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
Note down your key
COPY_LONG_KEY
from aboveExport this (public) key to a text file
The above command will create a new txt file
gpg-key.txt
Add this key to GitHub
Login to Github and goto profile settings
Click
New GPG Key
and paste the content ofgpg-key.txt
file then saveTell git client to auto sign your future commits
Run this command
Copy the short key from above and use this in the command below
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
28800 seconds means 8 hours
If gpg-agent is not running you can start it with this command
Change your key passphrase
At the gpg prompt type:
Type in the current passphrase when prompted Type in the new passphrase twice when prompted Type:
Reference Links
Last updated