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

本地 (Local)

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

bash 复制代码
1. $ ssh-keygen -t rsa -C "xxxxxxx@email.com" -f "github_id_rsa"
2. $ ssh-keygen -t rsa -C "xxxxxxx@email.com" -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配置公钥

验证

相关推荐
呆萌很39 分钟前
Git push 408 超时、远程断开解决办法
git
Lesile1 小时前
Hands-on Git experience
git
Co_Hui3 小时前
Git 基本使用
git
cooldream20093 小时前
AI 时代,Git 应该怎么学
人工智能·git
DogDaoDao3 小时前
【GitHub】WorldMonitor:一个工程极致主义的实时全球情报仪表盘深度解析
python·程序员·架构·github·go语言·worldmonitor·实时全球情报
其实防守也摸鱼4 小时前
GitHub开源项目破圈方法论:从技术自嗨到生态共赢
服务器·数据库·学习·开源·github·命令行·linux系统
析数塔4 小时前
SleeperGem 技术拆解:恶意 gem 是怎么躲过 CI/CD 扫描的
安全·ci/cd·github
柒和远方4 小时前
V053: 从 Git 回退到 AI 工程治理:Vibe Coding 的 Harness 工作流与质量阀门
git·vibecoding
Lvan的前端笔记6 小时前
ios:GitHub Actions云端Xcode26打包上架TestFlight
macos·github·xcode
炸膛坦客6 小时前
Git 和 GitHub:(五)一文给出常用 Git 命令,持续更新中......
git·github