gitlab配置ssh密钥

1.配置用户信息

git config --global user.name "你的名字"

git config --global user.email "你的邮箱"

查看配置是否成功 git config --global --list

2.生成密钥

终端 或 右键文件夹open git bash here

输入命令 ssh-keygen -t rsa -C '随意(生成SSH 密钥的标题)'

注:Enter file in which to save the key 可以写存放ssh密钥的路径

Enter passphrase (empty for no passphrase) 输入密码(空表示没有密码)

3.复制密钥

找到存放密钥的文件夹 ,默认为C:\Users\Administrator\.ssh

复制.pub文件的内容

4.gitlab上配置ssh密钥

(1)点击头像,选择编辑个人资料,

(2)选择SSH密钥

(3)点击添加新密钥

(4)将复制的.pub文件内容粘贴到密钥一栏,选择到期时间,添加密钥

5.ssh密钥配置完成~

相关推荐
国际云,接待7 小时前
云服务器 SSH 被扫爆了怎么办:安全组、密钥登录与 Fail2ban 的完整加固清单
服务器·安全·ssh
rustfs9 小时前
GitLab 如何与 RustFS 集成?
分布式·rust·gitlab
RisunJan1 天前
Linux命令-ssh-keyscan(从主机收集公钥)
linux·ssh
郝亚军2 天前
gitlab常用命令
gitlab
RisunJan2 天前
Linux命令-sshd(SSH 服务器守护进程)
linux·服务器·ssh
杨浦老苏4 天前
开源堡垒机 Warpgate:一个容器搞定 SSH、MySQL 和 Web 访问
运维·docker·ssh·堡垒机·群晖
xixingzhe25 天前
Java 使用 GitLab4J 实现 WebHook
gitlab
90后小陈老师6 天前
Windows 10 下 Gitee SSH 连接配置详解(附常见问题解决)
windows·gitee·ssh
dyxal6 天前
SSH本地端口转发完全解析:像“挖掘隧道”一样安全访问远程数据库
数据库·安全·ssh
我是小灰灰吖7 天前
Ubuntu 22.04 安装 SSH 服务与远程调试环境配置指南
qt·ubuntu·ssh