17

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.

krtek
  • 26,334
  • 5
  • 56
  • 84
Cassie
  • 1,179
  • 6
  • 18
  • 30
  • double check for typos? maybe repostoryName should be repositoryName? – PeskyGnat Mar 09 '12 at 19:53
  • what is the output of ?`hg push -vv` ? – krtek Mar 09 '12 at 20:08
  • Originally, when I did "hg push", it gave error message as "abort:certificate checking requires Python 2.6" so I used a "hg push --insecure" command. However, after doing it, when I pushed again, it then gave me error message as "Not trusting file /home/Cassie/aExperiment/aNewdirectory/.hg/hgrc from untrusted user Cassie, group Cassie ,abort: repository default-push not found!" – Cassie Mar 09 '12 at 20:16
  • Could then please give exactly the commands you're typing and the exact error message ? You can update your post for doing so. Also, what OS are you using and what is the user you're using ? – krtek Mar 09 '12 at 20:23

3 Answers3

20

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 !

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
krtek
  • 26,334
  • 5
  • 56
  • 84
  • 1
    Thank you a million! I just realized I push as a root user at my machine. Once I change to user "Cassie", it seems fine now. You are a godsend~ Good luck for all my linux fellows who are struggling now.:P – Cassie Mar 09 '12 at 21:42
0

I had a similar issue with this after creating a new repo. I had to add this to my /.hg/hgrc:

[paths]
default_push = <foopath> 
riffrazor
  • 447
  • 5
  • 8
0

I got this error when a previous clone had been aborted. It had a .hg folder by not .hgrc file and many other things were missing.

O'Rooney
  • 2,878
  • 2
  • 27
  • 41