github 提交代码问题解决

# 1. 生成 SSH 密钥
ssh-keygen -t ed25519 -C "your_email@example.com"
# 一路回车即可

# 2. 查看公钥
cat ~/.ssh/id_ed25519.pub
# 复制输出的内容

# 3. 添加到 GitHub
# 访问 https://github.com/settings/keys
# 点击 "New SSH key",粘贴公钥

# 4. 修改远程地址为 SSH
git remote set-url origin git@github.com:peter-dou/next_app.git

# 5. 测试连接
ssh -T git@github.com

posted @ 2025-12-12 10:36  窦戈  阅读(1)  评论(0)    收藏  举报