错误:找不到存储库。致命:无法从远程存储库读取

时间:2017-04-24 22:02:23

标签: git github ssh

我正在使用SSH尝试将新的repo推送到GitHub。

我采取的步骤:

git init
git add .
git commit -m "first commit"
git remote add origin git@github.com:******/**********
git push -u origin master

此时,我得到了:

The authenticity of host 'github.com (192.30.255.113)' can't be established.

fatal: Could not read from remote repository.

然后我创建了一个SSH密钥:

ssh-keygen -t rsa -b 4096 -C "*****@******.com"
pbcopy < ~/.ssh/id_rsa.pub

我复制并将密钥添加到我的GitHub帐户。

然后当我跑:

git push -u origin master

我明白了:

Enter passphrase for key '/Users/********/.ssh/id_rsa': 
ERROR: Repository not found.
fatal: Could not read from remote repository.

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

应该没有访问权限限制,因为这是我的回购。我在为密钥创建密码时键入了密码。

发生了什么?

1 个答案:

答案 0 :(得分:0)

您是GitHub存储库的所有者吗?如果没有,那可能是一个原因。要求项目所有者或组织管理员将您添加到协作者列表中。