The remote end hung up unexpectedly while git cloning

后端 未结 30 2587
旧时难觅i
旧时难觅i 2020-11-22 09:02

My git client repeatedly fails with the following error after trying to clone the repository for some time.

What could be the issue here?

30条回答
  •  伪装坚强ぢ
    2020-11-22 09:23

    Obs.: Changing http.postBuffer might also require to set up the Nginx configuration file for gitlab to accept larger body sizes for the client, by tuning the value of client_max_body_size.

    However, there is a workaround if you have access to the Gitlab machine or to a machine in its network, and that is by making use of git bundle.

    1. go to your git repository on the source machine
    2. run git bundle create my-repo.bundle --all
    3. transfer (eg., with rsync) the my-repo.bundle file to the destination machine
    4. on the destination machine, run git clone my-repo.bundle
    5. git remote set-url origin "path/to/your/repo.git"
    6. git push

    All the best!

提交回复
热议问题