【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配置公钥

验证

相关推荐
星海拾遗4 小时前
git rebase记录
大数据·git·elasticsearch
ljh5746491195 小时前
PhpStorm 2022.3 版本中,修改使用 Git 提交时看到弹出式的对话框模式
ide·git·php·phpstorm
云闲不收7 小时前
git rebase
git
江上清风山间明月7 小时前
git pull和git checkout在恢复文件的区别
git·pull·checkout
海鸥818 小时前
in argocd ‘/tmp/_argocd-repo/../.git/index.lock‘: No space left on
git·argocd
用户21991679703918 小时前
.Net通过EFCore和仓储模式实现统一数据权限管控并且相关权限配置动态生成
后端·github
尔嵘9 小时前
git操作
大数据·git·elasticsearch
好评1249 小时前
Linux文件上传git
linux·运维·git
大柏怎么被偷了11 小时前
【Git】企业级开发模型
git
Garfield200511 小时前
Git 分支拓扑实践
git·拓扑