GitHub SSH 配置指南 🚀

1
2
3
4
5
6
# 1. 配置 Git 用户名和邮箱
git config --global user.name "你的GitHub用户名"
git config --global user.email "你的GitHub邮箱"

# 2. 生成 SSH Key
ssh-keygen -t ed25519 -C "你的GitHub邮箱"

# 3. 查看公钥 cat ~/.ssh/id_ed25519.pub

复制第 4 步输出的整行,打开 GitHub SSH KeysNew SSH key → 粘贴 → 保存。

1
2
# 5. 测试
ssh -T [email protected]