Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT - cannot clone or pull repository (error output)

i have a problem with cloning/pulling some of GIT repositories. Most of repositories work correctly, but biggest one (commit count - we convert our two years old tfs project to GIT repositories) dont work.

Clone error:

git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks clone --branch master PROJECTPATHPLACEHOLDER.git C:\Workspace\GIT\PROJECTNAME Cloning into 'C:\Workspace\GIT\PROJECTNAME'... error: RPC failed; curl 56 Recv failure: Connection was reset fatal: error reading section header 'shallow-info'

Pull error:

RPC failed; curl 56 Recv failure: Connection was reset Git failed with a fatal error. error reading section header 'acknowledgments'

I try google possible solution, but none helped (increase http.postbuffer, different versions). I tried diferent version of the GIT (2.21,2.27,2.29), different environment for git (GIT cmd, Microsoft Visual Studio Professional 2019 Version 16.8.0, Sourcetree 3.3.9) with same error output.
We using BitBucket server as a git server. My configuration is laptop, win10 pro, remote over vpn.

I will be glad for any a help. Thanks, Lukáš Vašek

Ps. If there is any ambiguity, ask me for specification.

like image 932
L.Vasek Avatar asked Mar 24 '26 18:03

L.Vasek


1 Answers

I solved this same problem using the command:

git clone --depth 20 <repo>

Reference:

https://git-scm.com/docs/shallow

More about this:

git shallow clone (clone --depth) misses remote branches

like image 104
Everton Machado Rosa Avatar answered Mar 26 '26 09:03

Everton Machado Rosa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!