I have added repository and at the time of commit I get error as error: abort: no username supplied (see "hg help config"). I am not getting Mercurial.ini file on my local as well. Does anyone know how I can resolve this error on Fedora?
+3
A:
Simple answer - in your .hg folder, create a file named .hgrc
in there, add the following content (check hg help config
for the exact syntax)
[ui]
username = forname surname <[email protected]>
verbose = True
and save it. Should work now. Note that verbose = True is not required, but I included it since it is listed in the help content
(This is from memory, but hg help config
will tell you the correct filename and syntax)
ZombieSheep
2010-03-19 13:56:32
why the change to verbose ?
tonfa
2010-03-19 14:54:25
as I said in the answer, it isn't required, but I put it in since that's what `hg help config` outputs. Just in the answer for consistency. :)
ZombieSheep
2010-03-19 15:10:19
+5
A:
Either put a .hgrc in the .hg directory in your repo or put a .hgrc file in your home dir (then it covers all your projects) In the file you should write
[ui]
username = Your Name <your@mail>
cjg
2010-03-19 13:56:36
+1
A:
On Windows, these configuration files are read:
- "<repo>\.hg\hgrc"
- "%USERPROFILE%\.hgrc"
- "%USERPROFILE%\Mercurial.ini"
- "%HOME%\.hgrc"
- "%HOME%\Mercurial.ini"
- "C:\Mercurial\Mercurial.ini"
- "HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial"
- "<install-dir>\Mercurial.ini"
On Unix, these files are read:
- "<repo>/.hg/hgrc"
- "$HOME/.hgrc"
- "/etc/mercurial/hgrc"
- "/etc/mercurial/hgrc.d/*.rc"
- "<install-root>/etc/mercurial/hgrc"
- "<install-root>/etc/mercurial/hgrc.d/*.rc"
[ui] username = Your Name
cowboy
2010-04-07 02:04:57
A:
I had the same problem as user469020. After a few hours of unsuccesfull experimentation I just looked again at .hgrc and found misstyping usename instead of username.
palanutsa
2010-10-29 20:59:08