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密钥配置完成~

相关推荐
极小狐3 小时前
如何创建极狐GitLab 私密议题?
数据库·ci/cd·gitlab·devops·mcp
jianghx102419 小时前
Centos 7 ssh连接速度慢(耗时20秒+)
linux·centos·ssh
木心1 天前
Github两种鉴权模式PAT与SSH
ssh·github
极小狐1 天前
如何使用极狐GitLab 的外部状态检查功能?
数据库·ci/cd·gitlab·devops·mcp
极小狐2 天前
如何对极狐GitLab 议题进行过滤和排序?
人工智能·git·机器学习·gitlab
极小狐2 天前
如何创建并使用极狐GitLab 部署令牌?
运维·git·ssh·gitlab·github
极小狐2 天前
极狐GitLab 的合并请求部件能干什么?
运维·git·安全·gitlab·极狐gitlab
PLUS_WAVE2 天前
【SSH 端口转发】通过SSH端口转发实现访问远程服务器的 tensorboard
linux·服务器·ssh·软件工程·端口转发·tensorboard
极小狐2 天前
极狐GitLab 议题权重有什么作用?
开发语言·数据库·chrome·c#·gitlab
极小狐2 天前
极狐GitLab 的压缩和合并是什么?
运维·git·ssh·gitlab·github