尝试推送到远程存储库时出现多个错误

时间:2021-06-09 19:16:51

标签: git github git-remote repo

在编写了一个 javascript 项目之后,我写了

git push -u origin main

但是它给了我回报:

ssh: connect to host github.com port 22: Undefined error: 0
fatal: Could not read from remote repository.

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

pic to describe it

我该怎么办?我一般是 git/github 的新手,并且一直在尝试解决它,但运气不佳。提前谢谢大家的回答

1 个答案:

答案 0 :(得分:0)

通过 SSH 连接到 GitHub 时,请确保您已将 SSH 密钥上传到 GitHub。这篇文章解释了这个过程。

apply