原文地址:GitLab配置ssh key
Gitlab配置ssh key 1.打开本地git bash,使用如下命令生成ssh公钥和私钥对
ssh-keygen -t rsa -C 'xxx@xxx.com' 然后一路回车(-C 参数是你的邮箱地址)
2.然后会出现:Enter file in which to save the key (/Users/yzq/.ssh/id_rsa):
回车
3.如果你的.ssh/id_rsa已经,则会出现:/Users/yzq/.ssh/id_rsa already exists.
Overwrite (y/n)? y
输入:y(重新覆盖)
输入:n(不覆盖)
4.设置你的密码(位数不要太短,尽量设置6位)
详细如下图

文章图片
5.现在只需要查看本机ssh公钥,获取得到它
cd ~/.ssh
ls(查看目录是否有id_rsa.pub文件)
查看公钥:cat id_rsa.pub或者vim id_rsa.pub
详细如下图

文章图片
【【Gitlab】Gitlab配置ssh key】获取到的那一大段,就是我们需要的ssh key,复制下来,包括前面和后面的,给到下图配置,即可完成GitLab配置ssh key

文章图片
推荐阅读
- transformer|Swin-Transformer代码讲解-Video Swin-Transformer
- git使用技巧备忘(持续更新。。。)
- git 高级操作
- 同步GIT仓库的操作 -- pull命令
- git|git简单命令
- Git|Tomcat 自定义错误页面(例如404页面等等)
- 本地项目添加到gitee仓库管理
- centos|搭建Git服务器
- Git clone~fatal: protocol '?http' is not supported。解决办法。
- github开通,史上最全demo集合,各种demo持续更新中