In my case, I was cloning https://server/author instead of https://server/author/project. E.g. in the case of GitLab, I opened it in the web browser (the "author URL") and clicked the wanted projects inside to get their URL.