一、git客户端
windows下使用git客户端,需要ssh客户端软件,我用的是Git for windows
1.安装Git for windows
2.配置全局的用户名、邮箱
yshen@yshen-pc MINGW64 ~/Desktop
$ git config --global user.name "yshen"
yshen@yshen-pc MINGW64 ~/Desktop
$ git config --global user.email "2106678195@qq.com"
yshen@yshen-pc MINGW64 ~/Desktop
$ ssh-keygen -t rsa -C "2106678195@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/yshen/.ssh/id_rsa):
Created directory '/c/Users/yshen/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/yshen/.ssh/id_rsa.
Your public key has been saved in /c/Users/yshen/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:u8hux5rA/Lhmii9VUUugv6b4IoGSFcHVSMjNL/mcKEg 2106678195@qq.com
The key's randomart image is:
+---[RSA 2048]----+
| o.B+=o |
| =.=... |
| .. +. |
| E..+ . |
|o+ ..= .S |
|* oo..+ . |
|.o .* .. |
|+o oo=.oo. |
|+==+o+Bo. |
+----[SHA256]-----+
yshen@yshen-pc MINGW64 ~/Desktop
$
3.拷贝id_rsa.pub文件的内容,复制在gitlab的ssh模块,title任意取