【发布时间】:2022-02-06 21:42:38
【问题描述】:
我在我的工作笔记本电脑 (ssh-keygen -t ed25519 -C "me@my-personal-email.org") 上生成了一个 SSH 密钥,并将其添加到我的个人存储库的 SSH 密钥列表中。然而,当我尝试 git push 到这个个人回购(从我的工作笔记本电脑上)时,我收到了这样的信息:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我还将这些行添加到 repo .git/config:
[user]
name = MY NAME
email = me@my-personal-email.org
...我得到同样的错误。
repo 确实存在,我以为我已经设置了访问权限...我会遗漏什么?
【问题讨论】:
-
user.name和user.email设置是您可以随时更改的任意字符串,并且不用于身份验证。要了解身份验证如何与 ssh 一起工作,请参阅例如 this answer。要调试 ssh 身份验证,请考虑使用ssh -Tv;例如,请参阅here。