Enter in the window ssh-keygen -t rsa -C "注册GitHub的邮箱地址"
The following text appears after clicking enter, meaning that requests a path to save the key. We can directly enter the program will be the key saved in the default path
The following text appears after clicking enter, which means to set a password. If you choose to set a password needed to confirm the password. If do not want to set a password, you can directly enter twice
As a last appears to indicate that key has been generated
File path shown in the drawing, open the path to the file Explorer. Under the document plus id_rsa.pub it is that we have to get the key.
Open a text file id_rsa.pub , get key.
The second step configuration github
Log into the setting GitHub
Click on SSH and GPG keys and click the New SSH key
title bar title key, you can customize. key key column needs to be obtained in the first paste it here, then click add SSH key.
GitHub need to enter the password to confirm the addition SSH key click add SSH key.
Add the following situations represent key success on GitHub.
The third step is to configure local git
Verify that local git and GitHub binding is successful input in the git-bash ssh -T [email protected]and then click OK. The first execution of the instruction will be prompted to continue, you need to enter yes.
Enter yes and press Enter If there You've successfully authenticated, but GitHub does not provide shell access. is success binding.
Set the user name and login email git config --global user.name 'username' git config --global user.email 'login E-mail'
Associated with the creation and submission of the fourth step GitHub repository local repository
The need to create a file repository folder, right-select option git bash here.
Creating a warehouse entered in the window that opens git init
Add all the files to the repository in the input window that opens git add . , and then enter all documents submitted to the repository.
GitHub repository to create the new repository on GitHub Home login click the New button. Set up the warehouse name, create a readme file and then click Create repository
Warehouse SSH key acquisition After creating warehouses, click Clone or download button warehouse page, and then copy the SSH key.
Local warehouse and associated GitHub repository at git-bash open the window, enter git remote add origin 第5步获取的仓库的SSH key add all the files to the repository
Submitted to the local repository GitHub enter the git-bash at the open window, git pull --rebase origin master the local warehouse and synchronous remote repository, and then enter git push -u origin master to submit to the local repository GitHub