惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
WordPress大学
WordPress大学
雷峰网
雷峰网
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Latest news
Latest news
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
T
Tor Project blog
博客园 - Franky
U
Unit 42
K
Kaspersky official blog
博客园_首页
G
GRAHAM CLULEY
美团技术团队
I
Intezer
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
The Hacker News
The Hacker News
B
Blog
云风的 BLOG
云风的 BLOG
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Securelist
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
Martin Fowler
Martin Fowler
Schneier on Security
Schneier on Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
SegmentFault 最新的问题
W
WeLiveSecurity
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
Cyberwarzone
Cyberwarzone
爱范儿
爱范儿
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The GitHub Blog
The GitHub Blog
S
Security @ Cisco Blogs
GbyAI
GbyAI
P
Proofpoint News Feed
D
Docker
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
T
Tenable Blog
V2EX - 技术
V2EX - 技术
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
B
Blog RSS Feed

博客园 - 外科手术医生

Spring-AI开发之旅 MACD秒解 历史的车轮 添加pdf的目录 spring ai提示词 纳瓦尔宝典-总结内容 小龙虾的skills哪里找? JMeter压测使用 成功没有奇迹,只有积累----Bruce Lee 为什么要⽤ Foundry git命令下,mac环境下载依赖相关报错问题解决方案 数据分析/数据挖掘/机器学习---- 必读书目(转) 简单高效的语言 OSI模型-一图胜千言 dubbo分布式系统 JVM解剖 线程池 集合类 concurrent之CAS concurrent之volatile 架构师之路 责任链设计模式 Junit框架分析 线程详解 计划自己的时间
Git仓库ssh不同环境配置
外科手术医生 · 2025-09-23 · via 博客园 - 外科手术医生

1.生成公私钥

ssh-keygen -t ed25519 -C "xx@163.com" -f ~/.ssh/id_ed25519_work  

一直回车即可,完成后会生成这个打印的字符图

QQ_1758591393572

2.生成之后会保存到c/Users/PC/.ssh文件夹下

3.重复上面的步骤生成多个公私钥,修改id_ed25519_xx即可,如personal

4.将ssh的公钥配置到远程git仓库

5.创建config的文件夹

# 默认 GitHub 个人账号
Host gitlab.com-personal
    HostName gitlab.com
    User git
    IdentityFile C:\Users\PC\.ssh\id_ed25519_personal

# 公司 GitHub 账号
Host github.com-work
    HostName github.com
    User git
    IdentityFile C:\Users\PC\.ssh\id_ed25519_work

6.关联配置项,在git仓库文件夹内

git remote set-url origin git@github.com-work:xx/repo.git

git remote set-url origin git@gitlab.com-personal:xx/repo.git

7.推送远程仓库

git push -u origin main

-u--set-upstream)把本地分支和远程分支“绑定”起来,在第一次中使用