Reputation: 18013
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
Upvotes: 4
Views: 12678
Reputation: 66059
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.
Upvotes: 0
Reputation: 13246
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.
Upvotes: 0
Reputation: 73748
Please use the auth
section in your hgrc file. That will let you write things like:
[auth]
bb.prefix = https://bitbucket.org/
bb.username = mg
bb.password = something
Upvotes: 21
Reputation: 3323
With http authentication, I use hg push https://user:[email protected] in hgrc file, not sure if it helps here.
Upvotes: 8