大家好,又见面了,我是你们的朋友全栈君。
一、windows本地安装好git客户端,官网下载一路安装即可
二、右键选项打开git bash
代码语言:javascript复制$ ssh-keygen -t rsa <== 建立密钥对,-t代表类型,有RSA和DSA两种
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/HP/.ssh/id_rsa): <==密钥文件默认存放位置,按Enter即可
Enter passphrase (empty for no passphrase): <== 输入密钥锁码,这里直接按 Enter 留空
Enter same passphrase again: <== 再输入一遍密钥锁码,这里直接按 Enter 留空
Your identification has been saved in /c/Users/HP/.ssh/id_rsa.
Your public key has been saved in /c/Users/HP/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:W HSxCNKI31e0n0Cx0UgnIBA3ptgYrDTaBisGp7UYaY
The key's randomart image is:
---[RSA 2048]----
| .o. ..oooo o |
|.B = o. oo=. |
|*.O * = B o . |
| E B B o o |
| .. S |
|.o |
| . |
| |
| |
----[SHA256]-----
三、拷贝 c/Users/HP/.ssh/id_rsa.pub.里面的内容到gitlab SSH Keys
保存后,即可 GitLab与gitlab建立安全连接,正常克隆、push。。。。。。。了。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/128862.html原文链接:https://javaforall.cn