Home > Net >  git clone hangs for bitbucket repo on a Linux virtualbox vm
git clone hangs for bitbucket repo on a Linux virtualbox vm

Time:08-01

I am trying to clone the following git repository for an erlang app but it just hangs.

I am able to connect to the network and clone from github but not bitbucket.

strace and -vv flags yield little information.

[root@localhost test-dev]# git clone -vv https://[email protected]/r_s_o/epona.git Cloning into 'epona'...

CodePudding user response:

I tested cloning on my machine (with git version 2.35.3) and it had no problems cloning (in less than 2 seconds). However I do not doubt that you have problems.

One strategy for such problem is to instead of cloning the whole repository, start with cloning a fraction and then fetch the missing parts in chunks later on. E.g.

# Does even this fail?
git clone --depth 1 -vv https://[email protected]/r_s_o/epona.git

# Repo has now one commit, try to fetch one additional commit. Does this fail?
git fetch --deepen=1

# Since this particular repo only has 7 commits in total as of writing this, you might
# as well just repeat the last command 5 times. In the general case at this point you
# would typically try to fetch the next 10 commits, and if successful the next
# 100 commits, 1000 commits, etc.

  • Related