How to solve error message “abort: repository default-push not found! ” in Mercurial

hgrcmercurialpushrepository

I am new to Mercurial and tried to push a test file to a repository online.
I have encountered an error message as abort: repository default-push not found!
when I tried to use hg push command.
I have searched online and most of the answers mentioned to configure the .hg/hgrc file.
I have done it and checked my .hg/hgrc file. It did have something as

[paths]
default = https://ALab@bitbucket.org/Alab/analysis
[web]
cacerts = /etc/pki/tls/certs/ca-bundle.crt

To clarify my question, here are a few steps I performed and error messages I got. My machine is a RedHat Linux 5 server with default Python 2.4.3 installed. I have built a directory for Mercurial at /home/Cassie/CassieDir/analysis and a repository at bitbucket.org as analysis with username ALab. I have typed commit command and other hg status commands. They all seem fine. Then, I first created a dummy file called README and tried to push it at /analysis directory by

hg push

The error message showed:

abort: certificate checking requires Python 2.6

Then, to avoid certificate error, I then typed

hg push --insecure

The error message showed as

Not trusting file /home/Cassie/CassieDir/analysis/.hg/hgrc from untrusted user Cassie, group Cassie
Not trusting file /home/Cassie/CassieDir/analysis/.hg/hgrc from untrusted user Cassie, group Cassie
Not trusting file /home/Cassie/CassieDir/analysis/.hg/hgrc from untrusted user Cassie, group Cassie
abort: repository default-push not found!

I also typed "hg push -vv" and outputs is the same as above.

Thank you very much and please let me know if there is any confusion.

Best Answer

It seems the .hg/hgrc file doesn't belong to the correct user.

The error message says that the file belong to a user names Cassie which is in the Cassie group. You can either use this particular user to do the push or change the ownership of the file with the chown command. To know which user "you are", you can use the whoami command.

If you want more information about trust issues, you can read the dedicated page on the Mercurial wiki.

A third solution to your problem is described on this page, you can add either the user Cassie or the group with the same name to your "trusted" list. Edit, or create, a hgrc file in your home directory containing the following :

[trusted]
users = Cassie

But changing the ownership of the .hgrc file to the correct user is by far a better solution !