Git configured to use the secret key connected GitHub
Git deployment environment under Linux
1, install Git.
Use command to install git.
sudo apt-get install git
2, create a Github account
Github official website: https://github.com/
3, generating SSH KEY
Use command to generate SSH KEY.
ssh-keygen -t rsa -C "[email protected]"
Which, your_email own mailbox.
After completing the operation generates two files in the path to run the command line, I was y and y.pub.
4, using SSH
Github enter the official website, click on the upper left corner select "Settings".
Click on SSH and GPG keys, create SSH keys.
The generated secret key contents of the file to copy down, I was y.pub, pasted into the key. In theory should give your e-mail send an e-mail alert you bind keys.
Then locally, add your own secret key to git.
ssh-add the file name
If the issue has been under
Could not open a connection to your authentication agent.
Try running this command
ssh-agent bash
5, Git configuration file
git config --global user.name "你的用户名"
git config --global user.email "你的邮箱"
6, the test is successful ssh key
ssh -T [email protected]
Configuration success!
Git deployment environment under Windows
Install git
git official website: https://git-scm.com/
After the installation is complete, right-click the desktop