Search code examples
gitgithubclone

Git clone causes: "Cannot get remote repository information."


When I ssh -v [email protected], it authenticates fine.

However, when I git clone https://github.com/myusername/project.git I get:

Initialized empty Git repository in /home/webapps/myproject/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

I've triple checked that I'm entering the url correctly. Also, it doesn't matter whether I use the git:// vs http:// protocol. Any ideas?


Solution

  • Try actually using the SSH protocol (which is also what happens if you don't specify a protocol):

    git clone [email protected]:username/project.git
    

    Also double-check that you're typing the username and project correctly (and that you've forked the repository if you're trying to clone an existing project).