RPC失败;HTTP 400 curl 22 请求的 URL 返回错误:400 Bad Request

shu*_*ngh 7 git version-control git-push gitlab

我正在尝试将我的代码从旧存储库推送到新存储库,因为我的旧存储库似乎以某种方式损坏了

出现以下错误:

Counting objects: 19815, done.
Compressing objects: 100% (5264/5264), done.
Writing objects: 100% (19815/19815), 44.91 MiB | 134.87 MiB/s, done.
Total 19815 (delta 14641), reused 19405 (delta 14283)
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 Bad Request
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)

我尝试过git config http.postBuffer 524288000,但没有帮助我什至尝试这样做,git push --force origingit push --all收到了同样的错误

小智 0

我遇到了同样的错误。我的任务是从一台服务器移动到另一台服务器(TFSAzure),所有存储库(除了一个)都可以使用过程轻松移动。一个存储库在尝试进行PUSH时抛出了这样的错误。该存储库中大约有 15 个分支。我决定使用 . 一次转移一个分支git push url://to/new/repository.git branch-to-move:new-branch-name。当我将此选项应用于分支时,我得到了同样的错误。然后我转移了所有其他分支(它们没有问题)。之后master分支迁移就没有问题了。