This command works to get the files and compile them:
git clone a-valid-git-url
for example:
git clone git://cfdem.git.sour
This error got resolved when I tried initialising the git using git init . It worked