Git command returns "not found" or error code 404

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When pulling from, pushing or cloning to Bitbucket Server, it responds with the error code 404.

1 2 $ git push URL master fatal: URL/info/refs not found: did you run git update-server-info on the server?

Cause

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:

1 2 3 4 5 $ 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:

1 2 3 4 5 6 $ 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

Resolution

See Creating projects.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.