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

    xiaoxiao2021-03-25  166

    来源:http://blog.csdn.net/huahua78/article/details/52330792

    git remote –v查看远端地址或者查看配置 git config –-list    git status    git add .  git status  git commit -m “本次要提交的概要信息”  git push origin master把本地文件推送到远程仓库    git remote set-url origin 你的远端地址  设置远端仓库地址  git push origin master出现以下情况:    解决办法:删除当前key,然后重新生成key,  ssh-keygen -t rsa -C 1398499734@qq.com连敲两次回车键    会在本地C:\Users\你的用户名.ssh生成文件夹,里面有id_rsa和id_rsa.pub两个文件  然后复制id_rsa.pub文件里面的内容,到https://github.com/settings/keys新建一个,    设置远程地址:(上面新建的)  git remote add origin_new 新的地址  git remote –v查看  git push origin_new master重新推送  下面是设置用户名  Git config –global user.name “用户名”  git config –global user.email 邮箱地址

    设置代理:  git config –global https.proxy http://127.0.0.1:1080  取消设置代理:  git config –global –unset https.proxy

    取消git init操作时出现 rm: cannot remove ‘.git’: Is a directory  是因为输入的命令是: rm -f .git  解决办法:rm -rf .git 即删除整个.git目录

    转载请注明原文地址: https://ju.6miu.com/read-12371.html

    最新回复(0)