Search code examples
gitgitlabclone

gitlab clone takes a lot of time


Im doing SSH git clone -

git clone [email protected]:###############.git two3

for five minutes nothing happens, its stuck at

Cloning into 'two3'.

then it actually starts cloning. repo is about 35 MB size.

How to speed up the cloning.

this takes a long time


Solution

  • Aswering my own question This is due to Ipv6. It gets resolved when i am using -

    echo "# To prefer IPv4 over everything else" >> /etc/gai.conf
    echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf
    echo "precedence ::1/128 50" >> /etc/gai.conf
    echo "precedence ::/0 40" >> /etc/gai.conf
    echo "precedence 2002::/16 30" >> /etc/gai.conf
    echo "precedence ::/96 20" >> /etc/gai.conf