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

4

我正在使用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

I get:

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.

这是我的存储库,不应该有访问权限限制。我正在输入密码,因为我为密钥创建了它。

发生了什么事?


2
尝试运行 ssh -vvv git@github.com verify 命令进行验证。 - Jakuje
请仔细检查源是否正确。您可以通过执行 git remote -v 查看这些设置。 - sk8asd123
1个回答

0

你是 GitHub 仓库的所有者吗?如果不是,那可能是原因。请向项目所有者或组织管理员请求将您添加到协作者列表中。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接