git push error HTTP code = 413

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

 

 

将http 协议改为ssh认证就可以了

 

git remote set-url origin git@git.cdcep.com:xxx/PoetrySystem.git
git@git.cdcep.com :服务器名
xxx/PoetrySystem.git 仓库名,然后就可以提交了

当然你必须生成ssh 认证

ssh-keygen -t rsa -C "xxx@163.com" //你申请账号的邮箱

然后三次回车或者指定密钥路径和密码,默认产生的密钥和公钥在登录用户的.ssh文件夹下.

~/.ssh/id_rsa.pub 密钥保存在该文件

原文地址:https://www.cnblogs.com/bruce-gou/p/10062402.html