hg Push 带有 HTTP 服务器的凭据
我有一个带有一些 Mercurial 存储库的 HTTP 服务器;我在其中处理摘要身份验证,并且发现自己过于频繁地将更改推送到服务器,因此,我想知道是否有任何方法可以将凭据(用户和密码)与 hg Push
一起发送命令?
谢谢
I have a HTTP server with some Mercurial repositories; in which I handle digest authentication, and I found myself pushing changes to the server too often, so, I wanna know If is there any way to send the credentials (user and password) along with the hg push
command?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
请使用 hgrc 中的
auth
部分文件。这会让你写出类似这样的东西:Please use the
auth
section in your hgrc file. That will let you write things like:通过http身份验证,我使用 hg push https://user:[email protected] 在 hgrc 文件中,不确定这里是否有帮助。
With http authentication, I use hg push https://user:[email protected] in hgrc file, not sure if it helps here.
TortoiseHg 0.9.3 是第一个包含 mercurial_keyring< /strong> 扩展,我对此非常满意。上一个链接显示了使其工作所需的配置。
Mercurial 1.4.3 不包含它,但我希望它作为 Mercurial 软件包的一部分提供只是时间问题。
TortoiseHg 0.9.3 is the first version to include the mercurial_keyring extension, and I'm quite happy with it. The previous link shows the required configuration to make it work.
Mercurial 1.4.3 doesn't include it, but I hope it's just a matter of time before it will be available as a part of the Mercurial packages.
有一个默认密码扩展来自动提供凭据。除了按照 Sejanus 的建议将信用信息嵌入到 URL 中之外,没有太多优势。它仍然是纯文本,但确实将您的密码放入一个单独的文件中,您可以控制该文件的位置。如果没有这个,密码将存储在工作区的 .hg 文件夹中,因此如果工作区所在的文件系统是共享的,这可能是更好的选择。
There is a default password extension to automatically provide credentials. There's not much advantage to this beyond embedding the creds right in the url as Sejanus suggests. It's still plaintext, but does put your password into a separate file, the location of which you can control. Without this, the password is stored in the .hg folder in your workspace, so this might be preferable if the filesystem your workspace is on is shared.