I'm trying to set up a local repository with TortoiseHG. It's not linked to any remote repository; I just want to be able to manage changes on my own box.
Creating the repository went fine, but when I go to commit, I get an error:
Commit: Invalid username
Your username has not been configured.
Please configure your username and try again.
It very helpfully pops up a username configuration dialog. I fill in my username, and the rest of the options on that page just in case, and close it, try again... same error. I've given it a username, and it remembers it, but it still won't commit.
What am I missing?
If you specify a -u option to the hg commit command on the command line, followed by a username, this is always given the highest precedence. If you have set the HGUSER environment variable, this is checked next. If you create a file in your home directory called . hgrc, with a username entry, that will be used next.
Commit. Explorer: right-clicking anywhere in the folder, or on the folder itself, and then selecting Hg Commit… Write a commit message, select the files you wish to commit, then press Commit. Your previous commit message will be in the message history drop-down, so you do not have to type it in again from scratch.
1 Answer. Show activity on this post. Or in Workbench, right click on Tip and select Update. Or you can just right click, Update and select update to branchname / tip without worrying about the revision you are looking at.
After setting the username, make sure you close the commit dialogue rather than simply trying again from the open form. Then try to commit again. That fixed it for me.
To make it permanent, you should set it up in your hgrc
file, in [ui]
section, for example:
[ui]
username = John Doe
See http://www.selenic.com/mercurial/hgrc.5.html#files to get your hgrc
location (probably in your home dir as Mercurial.ini
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With