【发布时间】:2020-12-03 16:09:12
【问题描述】:
我在我的主目录/vincent 中为 github 设置了一个 ssh 密钥。我想将存储库克隆到我的/var/www/html 目录中。看来,密钥在我的主目录之外是未知的。我要怎么做,才能连接到/var目录下的github?
编辑:
使用 ssh 克隆时,我从 github 收到以下错误
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
【问题讨论】:
-
你是如何配置 git 和/或 ssh 来使用这个密钥文件的?当您尝试使用 ssh 或 git 时会发生什么?您收到任何错误消息吗?他们说什么?
-
我收到一条错误消息,提示我没有正确的访问权限:
git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. -
你在使用
sudo吗?你到底在运行什么命令来克隆?
标签: ubuntu github ssh ubuntu-18.04