Git系列:常见报错处理
- 软件开发
- 2025-08-19 22:27:03

本文小结Git使用过程中遇到的常见报错处理。
Git系列:常见报错处理 报错:fatal: could not read from remote repository, please make sure you have the correct access rights 报错:fatal: could not read from remote repository, please make sure you have the correct access rights根因:没有在Github上配置git本地秘钥
解决方案
确保本地git账号设置ok
配置指令如下 git config –global user.name "xxxxx" git config –global user.email "xxx@xx.xxx"查看是否配置成功,用命令:git config --global --list 查看本地秘钥是否与Github账户的公钥配置一致 生成秘钥 ssh-keygen -t rsa -C “上面的邮箱”注:执行上面命令后,连续回车3次 打印 - cd ~/.ssh,进入ssh目录 - cat id_rsa.pub,打印ssh公钥 再次尝试拉取代码 git clone ssh@…详细步骤见资料:link
Git系列:常见报错处理由讯客互联软件开发栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“Git系列:常见报错处理”