Git报错:“fatal: Could not read from remote repository”

起因:之前的公私钥文件好使,在换成远程办公后,再次操作:

Git报错:“fatal: Could not read from remote repository”

首先,将本地生成的 id_rsa以及id_rsa.pub这两个文件删除掉

然后,使用命令 ssh-****** -t rsa -C "邮箱地址"重新生成**:

Git报错:“fatal: Could not read from remote repository”

Git报错:“fatal: Could not read from remote repository”

最后,将id_rsa.pub文件里的内容复制到 git 的SSH key保存目录下即可。