tags:

views:

69

answers:

2

I want to create a hgrc file to set the username and password for all paths on some machine, e.g no matter in which directory I am in, hg clone some_path will always work without prompting for a username and a password (this is for an auto-deploy script). Also, it should work for several repos, not just one.

I followed the instructions and created a file: /etc/mercurial/hgrc.d/deploy.rc

it's contents:

[auth]
default.prefix= http://myrepo
default.username = myuname
default.password = pwd

But when I do hg clone some_path I get abort: error: Connection refused.

What Am i doing wrong?

+2  A: 

It should work. You can use hg showconfig to verify that it really is reading the config and that you don't just have a connection problem or something.

What version of hg are you using?

Also, it could be that your .hg/hgrc file is taking precedence over your global config.

apparently it didn't recognize my file. I deleted it and created another one with a different name, now it works... no idea what happened.But the `hg showconfig` helped debug it!
noam
+1  A: 

Could you get the log of the server you try to connecgt to?
It should be listed there if at least the server address is correct. And perhaps a hg clone -v something

Ton