Pushing with mercurial: abort: no username (see "Hg help config")

I'm not sure why, but from today I have a problem with pushing my source to the repo. I got abort: no username supplied (see "hg help config") The fact is that I have a [ui] section in hgrc:

 [ui] username = My username verbose = true 

Where is the problem?

+6
source share
2 answers

Try to do:

 hg --debug showconfig 

which shows all the configuration settings that Mercurial finds and where it finds them. Since it looks like you're on windows, one of the possibilities is the specifications (byte order markers) at the beginning of your hgrc file. Nodepad likes to post them there incorrectly.

As a last resort, you can always make hg --config ui.username=Whatever_you_want commit , but these are scary long-term solutions.

Finally, it is expected that the error is on commit , but you said you were getting it on push . I can not imagine how this could happen.

+10
source

Put hgrc in the .hg directory in your repo or put the hgrc file in your home directory (then it covers all your projects). You must write in the file ..

 [ui] username = Your Name < your@mail > 
-3
source

Source: https://habr.com/ru/post/915515/


All Articles