【Git】本地搭建Gitee、Github环境

本地 (Local)

1、使用命令生成公钥(pub文件)

bash 复制代码
1. $ ssh-keygen -t rsa -C "[email protected]" -f "github_id_rsa"
2. $ ssh-keygen -t rsa -C "[email protected]" -f "gitee_id_rsa"

2、创建config文件,并配置

bash 复制代码
# gitee
Host gitee.com
HostName gitee.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitee_id_rsa

# github
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_id_rsa

远程(Remote)

1、gitee配置公钥

2、github配置公钥

验证

相关推荐
Gladiator5759 小时前
博客记录-day152-力扣+分布式
github
jstart千语9 小时前
【Git】连接github时的疑难杂症(DNS解析失败)
git·github
工具罗某人9 小时前
TortoiseGit使用图解
git
Zhuai-行淮10 小时前
vscode和git 踩坑
ide·git·vscode
这颗橘子不太甜QAQ11 小时前
Husky使用技巧
javascript·git·代码规范
fanTuanye11 小时前
Git基本使用(很详细)
git·github
忍者扔飞镖11 小时前
git
git
Evenknow11 小时前
将"修改源码"改为更专业的"二次开发",体现技术深度
前端·github
uhakadotcom11 小时前
rAthena:快速入门与基础知识详解,附实用示例代码
面试·架构·github
李菠菜13 小时前
解决Windows系统下Git克隆时报错“unable to checkout working tree”的方法详解
windows·git