【异常】使用git clone 时提示git@github.com: Permission denied (publickey). fatal: Could not read from remote

张开发
2026/4/15 0:44:26 15 分钟阅读

分享文章

【异常】使用git clone 时提示git@github.com: Permission denied (publickey). fatal: Could not read from remote
一、SSH连接失败常见原因密钥未正确生成:密钥对未使用标准算法或保存路径错误公钥未正确配置:未将公钥添加到GitHub账户的SSH Keys中权限问题:本地~/.ssh目录权限非700私钥文件(id_rsa)权限非600认证代理问题:ssh-agent未运行或未加载私钥二、腾讯云服务器SSH密钥配置步骤生成密钥对(适用于Linux/macOS):ssh-keygen-trsa-b4096-C"your_email@example.com"

更多文章