- Push master to origin/master was rejected by remote
有三种原因
1:push的这个工程是其他人新建的,找她开通master权限后,再次push
2:git 工程错误
git pull
git pull origin master
git pull origin master --allow-unrelated-histories
3:github 设置原因
勾选了Keep my email addresses private
解决办法2种
第一种 通知账户人员取消勾选
第二种
重新设置你的全局用户E-mail
git config --list 查看这个时候一定不对
因此重新设置全局email
重置上次提交的作者信息 git commit --amend --reset-author
git config --global user.name "zch"
git config --global user.email "sdhshd@163.com"
ok
对了你如果使用的不是idea而是git
那么抛出的错误非常明显
如果抛出
git报错-->! [remote rejected] master -> master (push declined due to email privacy restrictions)
那么一定是这个原因
- git clone时报RPC failed; curl 18 transfer closed with outstanding read data remaining 错误
原因1:缓存区溢出
git config http.postBuffer 524288000
执行上面命令如果依旧clone失败,考虑可能原因2:网络下载速度缓慢
解决方法:命令行输入
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
如果依旧clone失败,则首先浅层clone,然后更新远程库到本地
git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git
git fetch --unshallow
- error: RPC failed; curl 28 OpenSSL SSL_read: Connection was reset, errno 10054 fatal: expected
git config --global http.sslVerify "false"
-
Failed to connect to 127.0.0.1 port 1080: Connection refused
-
这是由于设置了动态代理(最好下面方法都试一遍…因为可能设置了不只一次o(╥﹏╥)o);
-
git查看
查询动态代理
git config --global http.proxy
git config --global https.proxy
- 若是有返回值
取消代理
git config --global --unset http.proxy
git config --global --unset httpx.proxy
-
git配置文件查看 打开c:\Users\当前用户里的.gitconfig文件(这个默认是隐藏文件), 将里面关于proxy的行删掉
-
环境变量查看 打开环境变量,查看查看用户变量和系统变量(两个都要看….我就是两个都设置了o(╥﹏╥)o),将里面的http_proxy(也可能不是这个名字,但是看值是127.0.0.1:1080这种的就是了,或者有proxy),把这一行删掉就行
-
Failed to connect to github.com port 443: Timed out
D:\IdeaProjects\motorcycle>git config --global --unset http.proxy
D:\IdeaProjects\motorcycle>git config --global --unset https.proxy
D:\IdeaProjects\motorcycle>
-
remote: HTTP Basic:Access denied fatal:Authentication failed for
-
最终解决方法,控制面板 > 用户账户
- 然后找到 凭据管理器 选择Windows凭据
- 如图删除掉之前使用者留下的 凭据再次执行pull 就会弹出一个对话框来让你输入该 仓库的用户名和密码了