我刚刚设置了一个亚马逊EC2实例,并安装了git。
sudo yum install git
我接下来会介绍如何在Github上设置ssh密钥。现在当我试着将我的仓库克隆到/var/www/html文件夹中时,出现了以下错误...
fatal: could not create work tree dir 'example.com'.: Permission denied
当我以root身份运行时...
Cloning into 'example.com'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是我确保我的Github公钥与我的 ~/.ssh/id_rsa.pub 公钥匹配。这里有什么我忽略的吗?