GIT上传失败,报错信息:HTTP 413 curl 22 The requested URL returned error: 413

报错信息 

Enumerating objects: 79, done. Delta compression using up to 4 threads Total 40 (delta 25), reused 0 (delta 0) the remote end hung up unexpectedly the remote end hung up unexpectedly RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

应该是上传的文件太大了。解决办法通过ssh上传解决。

ssh-keygen -t rsa -C “邮箱或者名字”

会生成一个密钥,复制密钥里面内容【id_rsa.pub】到gitlab账号里

在切换远程仓库

git remote set-url origin {url} // url内容为项目的git地址

应该就可以了。

原文地址:https://www.cnblogs.com/FocusQi/p/11346316.html