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': joe.le@xxx.com
Password for 'http://joe.le@xxx.com@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 “joe.le@xxx.com”
  按3个回车,密码为空。把 id_rsa.pub里面的内容添加ssh key到git上面。

 

3、重设http为git地址

$ git remote set-url joe git@git.xxx.com:joe.le/frontend.git

 

接着最后一次push成功,也不需要输入密码了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值