git configuration ssh

git configuration ssh

 

1. Check whether the computer has a public key (the computer that transfers the project may have, the new configuration can be ignored, but it will be used later)要用git bash 或是idea terminal,终端不行(cmd)

cd ~ / .ssh     // Enter the folder 
ls        // List the files in the folder 

Public key: a file named after id_dsa or id_rsa, one of which has a .pub extension. 
         The .pub file is your public key, and the other is your private key.
2. Execute command to generate key
ssh-keygen -t rsa -C  "Your mailbox"         // Execute this command, the following are three or four carriage return operations after execution. 


(I don't want to bother to enter all directly)
 1. Confirm the storage path of the key (If you don't need to change the path, just press Enter);
 2. If there is already a key file under the saved path in the previous step, 
    you need to confirm whether to overwrite ( If the previous secret key is no longer             
    required to cover the carriage directly, such as the need to manually copied to another directory then covered);
 3 . Create a password (if no password directly enter);
 4. confirm password;
3. Check whether it is generated (in the same window);

Enter the folder where the key was just generated (default: C: \ Users \ Administrator \ .ssh):

ls
 // If there are more id_dsa and id_rsa, it succeeds.
4. To copy the public key configuration to the git repository

 

 5. Log in to your git repository to set up and configure ssh

git warehouse code cloud / Alibaba cloud, github are similar, 
find the setting-- ssh public key--paste and ok

 

 6: Pull items:

 

 

7:tortoisegit 常见错误disconnected no supported authentication methods available(server sent: publickey)

 

Mostly because of conflict between git and the little turtle, the solution is:

 

 2. Click the browse button to open the file directory, find ssh.exe in the git directory, and confirm. That's it.

 

 After the replacement is successful, pull it again. It should be able to pull normally. If not, change the SSH client back to Little Turtle's own program and try again

 

Guess you like

Origin www.cnblogs.com/dw3306/p/12682428.html