You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Git推送至GitHub时遭遇连接重置及公钥权限拒绝问题求助

Git推送至GitHub时遭遇连接重置及公钥权限拒绝问题求助

大家好,我在尝试把本地代码推送到GitHub仓库时碰到了一连串问题,想请各位帮忙看看怎么解决。

第一次执行git push origin main时,弹出了主机真实性验证的提示,我按照要求输入了yes,但紧接着就出现了连接重置的错误,具体输出如下:

git push origin main
The authenticity of host 'github.com (20.207.73.82)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes

Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
Connection reset by 20.207.73.82 port 22
fatal: Could not read from remote repository.

之后我又试了一次推送,这次直接碰到了公钥权限拒绝的错误,输出内容是:

git push origin main
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

我对SHA指纹这类概念不太懂,现在完全摸不清问题出在哪,也不知道该怎么操作才能成功把代码推上去。有没有大佬能帮忙分析下问题原因,再给点具体的解决步骤呀?

备注:内容来源于stack exchange,提问作者Gamer Clash

火山引擎 最新活动