Mercurial错误:中止未提供用户名 [英] Mercurial error: abort no username supplied

查看:38
本文介绍了Mercurial错误:中止未提供用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次使用Mercurial在WindowsXP上出现问题(可能会在所有Win安装中发生).我在一个不太明显的地方找到了答案,所以我自己问/回答这个问题,这样其他人就不必像我一样进行搜索.

Problem on WindowsXP (likely will happen on all Win installs), first time using Mercurial. I found the answer in an inobvious place so I'm asking/answering the question myself so others don't have to search like I did.

首次在计算机上使用Mercurial.

First time using Mercurial on machine.

添加新的Repoz:

c:\bla\>hg add

没问题.

接下来,提交:

c:\bla\hg commit

错误:

中止:未提供用户名(请参见汞帮助配置")

推荐答案

解决方案:

在我的Windows安装中,Mercurial.ini没有传播.它还需要向其中添加用户电子邮件.

On my Windows install, the Mercurial.ini did not get propagated. It also needs a user email added to it.

获取在Mercurial可执行文件安装目录(本机上的C:\Program Files\Mercurial\Mercurial.ini)中找到的默认Mercurial.ini文件. 并将其复制到用户主目录(在WinXP上为C:\Documents and Settings\myName).

Take the default Mercurial.ini file found at in the Mercurial executable install directory (C:\Program Files\Mercurial\Mercurial.ini on my machine) and copy it to your user home dir (C:\Documents and Settings\myName on winXP).

在Windows 7安装中,没有默认的.ini,您将需要在C:\Users\myName中创建一个新的.ini.

On a Windows 7 install there is no default .ini, you will need to create a new one in C:\Users\myName.

然后编辑该.ini文件.找到这个区域.用户名需要设置电子邮件.将为空白-在此处添加您的电子邮件名称.

Then edit that .ini file. Find this area. The username needs an email set. It will be blank--add your email name here.

[ui]
; editor used to enter commit logs, etc.  Most text editors will work.
editor = notepad
username = userEmail@domain.com

这为我解决了这个问题.

This fixed the problem for me.

这篇关于Mercurial错误:中止未提供用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆