首页 > 解决方案 > Git Clone Repo 到 Ubuntu 服务器密钥错误

问题描述

我正在尝试将我的远程 github 存储库克隆到我的 EC2 Ubuntu 服务器。当我跑sudo git clone git@github.com:user/test.git

我有消息

Cloning into 'test'...

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我需要设置什么才能在我的服务器中获取我的 github 存储库?我需要将密钥添加到我的 Github 帐户吗?我的服务器?

标签: ubuntugithubssh-keys

解决方案


GitHub 无法对您进行身份验证。您的 SSH 密钥未经授权。我建议您查看以下链接,因为该主题已被处理:

链接 1 主题:GitHub 错误消息 - 权限被拒绝(公钥)
链接 2 主题:权限被拒绝(公钥)

希望这有帮助!


推荐阅读