1、 git remote –v查看远端地址或者查看配置 git config –list

fatal: Could not read from remote repository.的解决办法-LMLPHP

2、 git status

fatal: Could not read from remote repository.的解决办法-LMLPHP

3、 git add . 
git status 
git commit -m “本次要提交的概要信息” 
git push origin master把本地文件推送到远程仓库

fatal: Could not read from remote repository.的解决办法-LMLPHP

4、git remote set-url origin 你的远端地址 
设置远端仓库地址 
git push origin master出现以下情况:

fatal: Could not read from remote repository.的解决办法-LMLPHP

5、解决办法:删除远端和当前key,重新生成key, 
ssh-keygen -t rsa -C 1398499734@qq.com连敲两次回车键

fatal: Could not read from remote repository.的解决办法-LMLPHP

6、会在本地C:\Users\你的用户名.ssh生成文件夹,里面有id_rsa和id_rsa.pub两个文件 
然后复制id_rsa.pub文件里面的内容,到https://github.com/settings/keys新建一个,

fatal: Could not read from remote repository.的解决办法-LMLPHP

7、然后设置远程地址:(上面新建的) 
git remote add origin_new 新的地址 
git remote –v查看 
git push origin_new master重新推送 
下面是设置用户名 
Git config –global user.name “用户名” 
git config –global user.email 邮箱地址

05-11 18:10
查看更多