Download and install Git, download address: https: //git-scm.com/download/win.
Enter git Git test is successfully installed on the command line.
- Right-click the desktop to open Git Bash Here, or open the icon.
Set user.name and user.email
git config --global user.name "quotes fill Github username"
git config --global user.email "quotes fill Github registered mail."Generate ssh key file:
ssh-keygen -t rsa -C "quotes fill Github registered mail."
Been enter, will generate a carriage return after three .ssh folder, the folder there are three files.
id_rsa private key is
id_rsa.pub public key is
known_hosts
- Adding the public key to GitHub
Open id_rsa.pub copy inside the public key, direct access https://github.com/settings/keys (you can also click on the upper right corner to open the GitHub Home avatar selected settings selection keys), select New SSH key, title can not fill the copy paste the public key into the key and then click on the Add SSH key.
- Test whether the connection is successful
git input
There will be connection information Connection reset by ... port 22, also or other connection information, if not wrong or can not find the file, all OK.