How to generate SSH keys

1. Check if SSH keys exist

   Enter the following command, if there is a file id_rsa.pub or  id_dsa.pub, there is no need to enter the second step to generate an SSH key

ls -al ~/.ssh

 

2. Generate a new ssh key

   生成public/private rsa key pair

   Type in the command line

ssh-keygen -t rsa -C "[email protected]"

id_rsaBy default, two files and id_rsa.pubtwo files     will be generated in the corresponding path (/your_home_path)

3. Set git account information

   Type in the command line

git config --global user.name "username"
git config --global user.email "email"

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326668042&siteId=291194637