I have just created a small corporate repository on Azure ( 1 commit per each of 2 branches, totall about 200mb of repo), then I deleted local repository. When I try to clone it to my local machine back( I assume proxy might be an issue here ) I get:
RPC failed: curl 56 failure when receiving data from the peer.
(However, if that is important, I also see that 100% objects received, 100% deltas resolved.) I am a very distant GIT user, but I have found a way to do the so called shallow clone of repo.
Question is: did I clone the repo with correctly? (it seems yes so far, but do the commands bellow look valid theoretically?):
git clone URL --depth=1
git remote set-branches origin '*'
git fetch -v --depth=1
Question 2. I still do not understand what was the issue with the error curl56.. Any ideas? P.S. Isn't it possible to download zipped repo from remote to local machine and then somehow link the unzipped directory to the remote(upstream)?
This error message means that your machine was unable to receive all of the data from the remote side. It could be that the other side hung up or the connection was interrupted; it's really not possible to say without more information.
If you're using a proxy, then yes, that's likely the problem. Unfortunately, proxies, antivirus programs, non-standard firewalls, and TLS MITM boxes all tend to tamper with connections and they are probably the single biggest cause of this problem with Git. These problems are all due to this software improperly tampering with the connection and can't be fixed by Git. You should report this to your network administrator and ask them to drop or fix the proxy (preferably the former), or you can use a network that doesn't have one.
It is not possible to download a zipped directory and then fill in the Git repository from that. Git stores the entire history of the project and determines what it needs from negotiation which commits are common on both sides. There's no way to get one of those commits from the contents of a zip file, so you'd have no common commits and you'd have to send everything anyway.
The usual way to clone a repository as a shallow one and then unshallow it is this:
$ git clone --depth=1 https://github.com/git/git.git
$ cd git
$ git fetch --unshallow origin