git clone gets hung and gets timedout

I suggest you set the git clone timeout value upto a logger value, the default is 10 minutes. It would cause error if the git repo is big enough or the networking is not good.

Here is how to change the default git clone timeout value:

Source Code Management --> Git --> Add--> Additional Behaviours --> 
Advanced clone behaviors --> Timeout (in minutes) for clone and fetch operations

You can set it to 60 mins for example.


Harish Talanki's suggestion helped to narrow down the issue. It was a DNS issue on the stash. The GIT TRACE identified the same.


Under Git select "Add" and "Select Advanced checkout behaviors" enter image description here

Now specify the higher time-out period like 60 or 90 minutes (instead of default 10 minutes)

enter image description here