Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)

Python74

经过几个小时研究,从http连接到ssh连接(后者成功,前者老是出问题),之后出现如下问题
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)
上图问题仅限于ssh连接,如果这种情况是因为ssh key的原因,可以参考该链接(Intellij的):https://blog.csdn.net/qq_42846022/article/details/88762821,也可以继续看我的操作(我是参考了该文章)。

首先,打开Git Bash,这个直接右键或者开始进入都行。然后输入

ssh-keygen -t rsa -C '(你注册git时的邮箱)'

输入完后出现"Enter file in which to save key(/c/Users/Administrator/.ssh/id_rsa):",可能每个人的不一样,但是没关系,直接回车
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)
之后出现
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)
这个通俗说就是输入密码QWQ,牢记,很重要(后面要用到,以及ssh上传也会用到),之后呢,出现下图情况
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)
进入上面所显示的地址,打开id_rsa.pub(记事本打开就行),然后Ctrl+A全选复制(后面要用到)
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)
之后呢,网站登录Git,右上角头像点击,进入"Settings"
Git用ssh方式上传出现Could not read from remote repository—Windows(学习ing)

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长