How to solve error message "abort: repository default-push not found! " in Mercurial?
Asked Answered
E

3

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://[email protected]/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.

Eddra answered 9/3, 2012 at 19:27 Comment(4)
double check for typos? maybe repostoryName should be repositoryName?Ona
what is the output of ?hg push -vv ?Lacewing
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!"Eddra
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 ?Lacewing
L
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 !

Lacewing answered 9/3, 2012 at 21:30 Comment(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.:PEddra
L
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> 
Longsighted answered 7/3, 2015 at 20:34 Comment(0)
C
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.

Cythiacyto answered 6/5, 2021 at 3:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.