git efrror: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up
Git push代码的时候报错:
$ git push joe wechat2 Username for 'http://git.xxx.com': [email protected] Password for 'http://[email protected]@git.xxx.com': Counting objects: 428, done. Delta compression using up to 8 threads. Compressing objects: 100% (81/81), done. Writing objects: 100% (229/229), 9.98 MiB | 0 bytes/s, done. Total 229 (delta 173), reused 198 (delta 146) efrror: RPC failed; result=22, HTTP code = 413 atal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to-date
搜索关键字:‘fatal: The remote end hung up unexpectedly’ 和 ‘efrror: RPC failed; result=22, HTTP code = 413’
说需要设置上传大小:
$ git config http.postBuffer 524288000
我这边的确也设置了,push的时候还是报这样的错。
搜索关键字:‘Delta compression using up to 8 threads’
说需要设置提交格式:
$ git config core.autocrlf true
我也去设置了,但是还是报错,最后给git管理员说明,说是需要设置ssh提交。
具体解决方案:
1、本机设置hosts对应服务器地址
192.168.1.1 git.xxx.com
2、生成ssh key关联到gitlab
$ ssh-keygen -t rsa -C “[email protected]”按3个回车,密码为空。把id_rsa.pub里面的内容添加ssh key到git上面。
3、重设http为git地址
$ git remote set-url joe [email protected]:joe.le/frontend.git
接着最后一次push成功,也不需要输入密码了。
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16