Git笔记-配置ssh

Git在Deepin中的ssh配置

一、环境

系统: Deepin v23

Git仓库:GitHub

二、安装

1. 查看GitHub账户

在设置界面看到自己的邮箱,这个邮箱就是后面会用到的邮箱

2. 配置 git

邮箱和上面保持一致

bash 复制代码
git config --global user.name "your name"
git config --global user.email "youremail@xxx.com"

3. 生成 ssh key

在终端中输入以下命令,后面的字符串就是跟你的邮箱

bash 复制代码
ssh-keygen -t rsa -C "youremail@xxx.com"

输入后一直回车即可看到邮箱地址

保存的位置就在 自己主目录下的 .ssh 文件夹下,待使用的就是 id_rsa.pub 文件。

三、配置

在 GitHub 中选择如下

bash 复制代码
cat ~/.ssh/id_rsa.pub

把上面的文件内容拷贝到 里面即可使用了

相关推荐
木雷双雄743 分钟前
Git 版本回退操作指南
git
m0_5791466511 小时前
已被 Git 追踪的本地修改文件如何实现临时忽略
git
糖少主13 小时前
WSL中使用Beyond Compare 3/4/5作为difftool
git·wsl·beyond compare·difftool
zh路西法13 小时前
【SSH 免密登录全流程】Windows Linux 通用方案
linux·windows·ssh
console.log('npc')15 小时前
Git版本管控:git reset \+ git push \-f 原理、实操与避坑指南
git
恋喵大鲤鱼20 小时前
git reflog
git·git reflog
高旭的旭21 小时前
反向 SSH 隧道远程方案
运维·ssh
MatrixOrigin1 天前
MatrixOne Git4Data 技术详解(二):从零跑通所有 Git 原语
git
anew___1 天前
常用的 Git 工作流
git
shimly1234561 天前
git diff 生成一部分文件的补丁
git