如何在 Eclipse 中更改 Hg 存储库的凭据?
这与这个情况完全相同,但用汞代替 SVN。我安装了 MercurialEclipse,并且更改了远程存储库的密码。现在当我同步时它失败了。
我在“C:\Documents and Settings\%USER%\Application Data...”中没有找到任何关于Hg的conf文件。 我已经删除了 .keyring eclipse 文件并重新启动但仍然失败。
Eclipse 3.6.1 与 MercurialEclipse1.6,在 Windows Vista 上
回复 pyfunc (谢谢):
我在 .hg\hgrc 中找到了这样的条目: [路径] 默认 = https://user:[ email protected]/myprojectpath
所以我更改为新密码并重新启动 eclipse,但仍然得到“授权失败”...
This is exactly the same case as this one, but with Hg instead of SVN. I have MercurialEclipse installed, and I have changed the password of my remote repo. Now when I synch it fails.
I have not found any conf file in "C:\Documents and Settings\%USER%\Application Data..." about Hg.
I have deleted the .keyring eclipse file and restarted but still fails.
Eclipse 3.6.1 with MercurialEclipse1.6, on windows Vista
In reply to pyfunc (thanks):
I found an entry like this in .hg\hgrc:
[paths]
default = https://user:[email protected]/myprojectpath
so I changed to the new password and restarted eclipse, but still I get 'authorization failed'...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我终于找到了实现这一目标的方法。如果我选择“同步”,我会看到一个对话框,我可以插入正确的值,所以现在我可以同步了!
这并不能解释为什么更改 .hgrc 中的值不起作用,但至少现在已经解决了,尽管了解详细信息会很高兴......
I finally found out a way to achieve this. If I select "Synchronize With" I get a dialog and I am able to insert the good values, so now I could synch!
This does not explain why changing values in .hgrc didn't work, but at least is solved now, although it would be nice to find out about the details...
通常存储在 .hgrc 文件中。即用户配置文件存储在HOME目录中。您应该能够在那里更改密码。
根据 Mercurial 的手册页,有一些关于 Windows 上配置文件位置的建议。
它也可能位于/.hg/hgrc
Typically that is stored in .hgrc file. That is the user configuration file stores in the HOME directory. You should be able to change the password there.
As per the man page of Mercurial, there are some suggestions about the location of config file on windows.
it could also lie in /.hg/hgrc
经过一番挖掘终于找到了配置文件...它位于 ${workspace_location}/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.vectrace.MercurialEclipse
如果关闭 Eclipse,请打开此文件,然后仅删除底部以 repo_ 开头的行,为该存储库保存的设置(包括凭据)应在下次打开 Eclipse 时清除。您可能需要备份该文件以防万一。
由于这些凭据会覆盖 hgrc 中的所有内容,因此删除这些凭据应该允许存储库使用您的全局设置进行身份验证。您不一定会在 Eclipse 中的用户名/密码字段中看到凭据,但如果您单击“下一步”/“完成”,它应该可以正常工作。
Finally found the config file after some digging... it's in ${workspace_location}/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.vectrace.MercurialEclipse
If you close Eclipse, open this file, and delete just the lines at the bottom starting with repo_, the settings you have saved for that repository (including credentials) should be cleared the next time you open Eclipse. You'll probably want to make a backup of the file just in case.
Since these credentials override whatever you have in your hgrc, deleting these should allow the repositories to authenticate with your global settings. You won't necessarily see the credentials in the username/password fields in Eclipse, but if you click Next/Finish anyway, it should work fine.