How does git generate an ssh key? Many friends don't know how to use git software to generate a configuration key after downloading git. Today, the editor will explain to you the detailed steps of git generating and configuring the ssh key key.
Specific steps are as follows:
1. On the computer desktop, right-click the mouse and select " Git Bash Here " to open the Git command window;
2. Configure the user in the Git command window and enter the following command:
git config --global user.name "blkj"
Among them: "blkj" is the user name you want to fill in.
3. Continue to configure the mailbox in the Git window and enter the following command:
git config --global user.email "[email protected]"
Among them: "[email protected]" is the user's own email address
4. At this time, the .gitconfig configuration file will be generated in the C:\Users\Administrator directory (this file cannot be deleted);
5. View the contents of the .gitconfig configuration file;
6. Continue to enter the following commands in the Git command window to generate SSH public and private keys.
ssh-keygen -t rsa -C "[email protected]"
7. Enter the C:\Users\Administrator\.ssh directory and view the generated SSH key;
8. Enter the following command in the Git window to view the public key and private key
cat ~/.ssh/id_rsa.pub
The above is an introduction to how git generates ssh keys. I hope it will be helpful to all my friends.