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

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

相关推荐
SaN-V2 小时前
MacOS 下 VS Code 中 Codex 通过 SSH 连接远程服务器无法使用的问题排查与解决
服务器·macos·chatgpt·ssh·codex
悟道子HD4 小时前
计算机网络端口记忆指南
计算机网络·http·https·ssh·ftp·端口号·smtp
向上_503582914 小时前
解决git提交冲突
git
学习使我健康4 小时前
Git Submodule 深度避坑指南
git
Java后端的Ai之路6 小时前
SSH配置与GitHub项目拉取操作指南
elasticsearch·ssh·github·公钥
minxihou6 小时前
Windows 11 OpenSSH Server 完整排错指南(微软账号场景)
windows·microsoft·ssh·openssh·troubleshooting·windowswsl2
Mapleay6 小时前
git notes
git
阿汤哥的程序之路6 小时前
ProxyJump
ssh
zhougl9966 小时前
非root用户,链接ssh,并上传git
运维·git·ssh
muddjsv16 小时前
Git 代码同步与协作的核心命令全解析
git