for me the issue occurred because I was inside another repo and was trying to clone another one by mistake. just check if you are not inside a repo or the dir should not have git related files.