My Mercurial server requires https authentication for pulls. How can I cache my authentication information on the client without exposing a plain-text password on disk?

I'm looking for something like [using sudo with mercurial and ssh authentication](https://stackoverflow.com/questions/2799460/using-sudo-with-mercurial-and-ssh-authentication) but for HTTPS.