Git create a public and private key

Warmly recommended: Super Multi IT resources, all in 798 Resource Network

SSH key is used to establish a secure connection to your computer and GitLab / github.

git config --global user.name xianhenyuan
git config --global user.email [email protected]

Create public and private key
cd ~ / .ssh
SSH-keygen -t rsa -C "[email protected] "
Then let enter three questions,
the first one is to generate a file name,
the second if there is a password, no Enter the password directly, and the third to confirm the password.
Then the file name .pub file contents inside the sshkey added to the gitlab

# Add the key to the server.
ssh-add ~ / .ssh / 163

Then you can git operate.

If the windows git branch has been prompted not Open A Connection to Could your authentication Agent.
# On the first
SSH-Agent bash
# then
ssh-add ~ / .ssh / 163

Guess you like

Origin blog.csdn.net/xianhenyuan/article/details/92794852