git报错:error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

git报错:error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

如图:

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

原因是上传的文件过大,网上解决方案很多种,但是亲测有效的是把https传输改为ssh即可。

首先查看远程仓库:

git remote -v

这里输出的是https的远程仓库名。

需要把远程仓库修改为ssh:

git remote set-url origin  ssh://[email protected]:23456/example/MyProject

通常,ssh全链接可以在gerrit上查到。

如果改为https,则为:

git remote set-url origin  https://[email protected]/example/MyProject

git查看当前分支所属的远程仓库地址_查看分支的具体地址_zhangphil的博客-CSDN博客文章浏览阅读5k次。git remote -v_查看分支的具体地址https://blog.csdn.net/zhangphil/article/details/113763400git删除远程remote分支_git remote delete-CSDN博客文章浏览阅读3.3k次。git 命令如下:git push origin --delete_git remote deletehttps://blog.csdn.net/zhangphil/article/details/51752334

猜你喜欢

转载自blog.csdn.net/zhangphil/article/details/134655089
今日推荐