Mercurial “no username supplied” error on Mac

只愿长相守 提交于 2019-12-31 07:38:10

问题


I've just installed Mercurial on my OSX Mountain Lion Max (10.8) and on my first commit I'm getting the error:

abort: no username supplied (see "hg help config")

I've seen a load of answers which suggest I need to create or copy a file form a certain location and paste it into another location and add my username and email to the document.

If that is the right thing to do:

  • Where is the file I need to copy (or what is the file called that I need to create)
  • Where do I put that file
  • Do I just need to add the following two lines to the file?

    [ui]
    username = Your Name <your@email.com>
    

Thanks for your help.


回答1:


That file is named .hgrc and it is located in your home directory. If you just append those lines to ~/.hgrc and everything should be fine.

An extremely detailed overview of the Mercurial configuration file is located here.

Another less convient way is to pass -u your@email.com on the command line.



来源:https://stackoverflow.com/questions/12373194/mercurial-no-username-supplied-error-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!