Article Directory
foreword
Before working on the project, I hope you have installed node.js and Git Bash Here
1. Obtain email and password
1. Configure your name and email locally
git config --global user.name "你的名字"
git config --global user.email "你的邮箱"
Of course, if you are a remote warehouse that cannot be connected due to other reasons such as the low version of Git Bash Here, it means that you have a name and password, so you can directly use the second step to obtain your local email and password.
2. Use the command to get your local email and password
git config --global -l
The effect is as shown below
2. Generate ssh public key
1. Open Git Bash Here in any folder path and enter the following command and press Enter three times
ssh-keygen -t rsa -C "你的邮箱"
2. Open the folder according to the address in the red box above
3. Open and view the id_rsa.pub file
3. Connect ssh on GitHub
1. Find the settings (settings)
2. Find SSH and GPG keys on the left (SSH and GPG keys)
3. Click News SSH key
4. Enter the title (Title) and key (key) and click Add SSH key to add a new ssh key
The new ssh key needs to verify the git password
5. After the addition is successful, return to SSH and GPG keys to see your newly added ssh key
4. Verification
1. Open Git Bash Here and enter the following command
ssh -T [email protected]
2. If it is the first time setting, the following command will appear, just enter yes
In this way, even if the connection is successful