本文介绍了GitHub 错误消息 - 权限被拒绝(公钥)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人看到过这个错误并且知道该怎么做吗?

Anybody seen this error and know what to do?

我正在使用终端,我在根目录中,GitHub 存储库存在,但我现在不知道该怎么做.

I'm using the terminal, I'm in the root, the GitHub repository exists and I don't know what to do now.

> git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

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

推荐答案

我知道这个问题.添加 ssh 密钥后,也将您的 ssh 密钥添加到 ssh 代理(来自官方 docs)

I know about this problem. After add ssh key, add you ssh key to ssh agent too (from official docs)

ssh-agent -s
ssh-add ~/.ssh/id_rsa

一切正常后,git可以查看正确的密钥,之前不能.

After it all work fine, git can view proper key, before couldn't.

这篇关于GitHub 错误消息 - 权限被拒绝(公钥)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 03:44