我在阿里云 ECS 上执行 git 命令,遇到如下错误:
PLease make sure you have the correct access rights
and the repository exists.
我的 github SSH keys 区域,去年已经维护了对应的 SSH keys:
/root/.ssh
将本地的 id_rsa 文件拷贝到阿里云 ECS,执行命令行:
ssh -T git@github.com
报错:
It is required that your private key files are NOT accessible by others.This private key wiut be ignored.
Load key "/root/.ssh/id_rsa": bad permissions
git@github. com: Permission denied (publickey)
执行如下命令行,修改 id_rsa 文件的访问权限:
chmod 400 ~/.ssh/id_rsa
执行成功。
更多Jerry的原创文章,尽在:"汪子熙":
网友评论