Git command returns "not found" or error code 404
When pulling from, pushing or cloning to Bitbucket Server, it responds with the error code 404.
$ git push URL master fatal: URL/info/refs not found: did you run git update-server-info on the server?
The project and/or repository do not exist, or you do not have permissions to view this repository.
In Bitbucket Server 1.0.1 and above you should not get this error, instead you will get an explanation inline in the terminal, e.g. when using https:
$ git clone https://bitbucket-dev.atlassian.com/scm/PROJ/repo Cloning into 'repo'... fatal: remote error: Repository does not exist The requested repository does not exist, or you do not have permission to access it.
or when using ssh:
$ git clone https://bitbucket.example.com/scm/PROJ/repo Cloning into 'repo'... fatal: remote error: Remote URL invalid A repository could not be determined from the remote URL. Please confirm the clone URL in Bitbucket Server and try again. URL suffix: '/PROJ/repo' fatal: The remote end hung up unexpectedly
See Creating projects.