I have googled and found many solutions but none work for me.
I am trying to clone from one machine by connecting to the remote server which is in the LAN network.
Using @cmpickle answer, I built a script to simplify the clone process.
It is hosted here: https://gist.github.com/gianlucaparadise/10286e0b1c5409bd1049d67640fb7c03
You can run it using the following line:
curl -sL https://git.io/JvtZ5 | sh -s repo_uri repo_folder