/info/refs not valid: is this a git repository?

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When attempting to push or perform certain other write tasks on a Git repository, you may see the error:

Pushing to https://USERNAME@bitbucket.org/USERNAME/REPONAME.git 
fatal: https://USERNAME@bitbucket.org/USERNAME/REPONAME.git/info/refs not valid: is this a git repository?

Causes and Resolutions

The repository may not be a Git repository

We've seen many cases where a new repository was accidentally created in the Mercurial DVCS format instead of Git. If this repository is new, you can simply delete the repository and re-create it as a Git repository.

This is a new repository and you haven't pushed a branch yet

When creating a brand new Git repository, you must specify the initial branch (called master by default) when pushing for the first time. You must also tell the remote Git server that you want it to create and track that branch on the server as well. To do this, ensure your initial push looks similar to:

git push -u origin master

This tells Git that you are pushing to the repo with an alias of origin to the master branch and to track that branch -upstream.

The owner of the repository may be over their plan limit

In certain edge cases, users who have certain types of repository access won't be able to see the correct message when an account is over their plan limit. To check this, speak to the repository administrator and ask them to visit their Plans and billing page to view who has access and whether they are over. The user can also increase their plan from this page by selecting Change plan.

If none of these are the issue, please report the issue to support via this link. Creating an account on support is free and a member of the Bitbucket Cloud support team will assist you shortly.

 

 

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.