Skip to main content

Credentials Extension

This is an extension for Mercurial 5.6 or later, allowing you to store HTTP passwords securely. The extension itself does not offer any commands, you simply enable it, and get an extra prompt:

$ hg pull
pulling from https://example.com/private/repo
http authorization required for https://example.com/private/repo
realm: Mercurial
user: me
password: <SECRET>
would you like to save this password? (Y/n)  y
searching for changes
no changes found

That would result an a new item named in your key chain or key ring:

Mercurial (me@example.com)

Once a password is saved, there’s nothing more to do. You’ll get a new prompt, should the password suddenly stop working. To manage or delete your passwords, use the Keychain Services application included with macOS, GNOME Keyring or something similar included in your desktop environment.

Requirements

  • Python 3.6 or later.

  • Mercurial 5.6 or later.

  • SecretStorage on platforms other than macOS.

Windows is not supported, yet.

Installation and usage

Install the extension and its dependencies with Pip:

$ pip install .

Then, add the following lines to your ~/.hgrc:

[extensions]
credentials =

To avoid entering passwords for each and every repository, use auth.schemes:

[auth]
example.prefix = example.com
example.username = me

This will cause all repositories on https://example.com to resolve to the same Keychain item. See hg help config.auth for details.

Alternatives

The most obvious alternative to this extension is the Mercurial Keyring extension. It supports older versions of Mercurial and more backends, but saves passwords in a less readable fashion.

Future plans

  • Consider whether it makes sense to implement a completely custom urllib2 password manager, so passwords aren’t stored in memory any longer than strictly necessary.

Acknowledgements

Thanks you to Octobus and Heptapod for hosting this project, and for making Mercurial development fun again!

Metadata

Release files for hg-credentials 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hg-credentials 0.1.2
File Size Uploaded Provenance Actions
hg-credentials-0.1.2.tar.gz 16.7 kB Without provenance Details for hg-credentials-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for hg-credentials 0.1.2
File Actions
hg_credentials-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 12.0+ x86-64 Details for hg_credentials-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl
hg_credentials-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 12.0+ x86-64 Details for hg_credentials-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl
hg_credentials-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 12.0+ x86-64 Details for hg_credentials-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl
hg_credentials-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl CPython 3.9 CPython 3.9 macOS 12.0+ x86-64 Details for hg_credentials-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl
hg_credentials-0.1.2-cp38-cp38-macosx_12_0_x86_64.whl CPython 3.8 CPython 3.8 macOS 12.0+ x86-64 Details for hg_credentials-0.1.2-cp38-cp38-macosx_12_0_x86_64.whl

Total release size: 127.3 kB

Release files / hg-credentials-0.1.2.tar.gz

Download URL hg-credentials-0.1.2.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ff77d95ec9899a51c48723b21e8b3919c92ac21d54e33472c060073fdd4073e6
BLAKE2b-256 checksum
How to use checksums
c6956c0905f3849a9881f10b344b67b15d8c9427879057f0c1f8e5b570e482a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hg_credentials-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl

Download URL hg_credentials-0.1.2-cp312-cp312-macosx_12_0_x86_64.whl
Size 22.1 kB
Tags CPython 3.12 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
c0907038effa63a27b360dc07d9ee65412c6b7d822e0e1a7035bfbb4116b11c9
BLAKE2b-256 checksum
How to use checksums
348dbf752dc20e561d7f9bdf5e40245a5f1b3818ff8da67172ff79fb99abf3d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hg_credentials-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl

Download URL hg_credentials-0.1.2-cp311-cp311-macosx_12_0_x86_64.whl
Size 22.1 kB
Tags CPython 3.11 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
f8647a5322109654d7c4fbe2f242e4995827444c7b128ed9e8991d70ff1d63f0
BLAKE2b-256 checksum
How to use checksums
5067097808045c2d4442c172ed9ed1fde7a58568c23b7b3324bbbf8b886de226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hg_credentials-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl

Download URL hg_credentials-0.1.2-cp310-cp310-macosx_12_0_x86_64.whl
Size 22.1 kB
Tags CPython 3.10 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
14b3b21fcd07c0e8ffd6722cfb80b674f2fa6bfdd4846fe9f1e6797038023c31
BLAKE2b-256 checksum
How to use checksums
1d16320a937e7c26345a7bce17378ac2567684a4c1328f6d796f83edc7d1eebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hg_credentials-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl

Download URL hg_credentials-0.1.2-cp39-cp39-macosx_12_0_x86_64.whl
Size 22.1 kB
Tags CPython 3.9 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
3a675fa81497e6296611b733eeca4ffca7a1bcee0250c5693287c52e6a1bb2ad
BLAKE2b-256 checksum
How to use checksums
3eaabfc3e93d3141b50da3da1d1a93bfd616fa5fbbdbdf8bce81765866be2f2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hg_credentials-0.1.2-cp38-cp38-macosx_12_0_x86_64.whl

Download URL hg_credentials-0.1.2-cp38-cp38-macosx_12_0_x86_64.whl
Size 22.1 kB
Tags CPython 3.8 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
cad9932cdb0ebb3117e00b0c70310ed9608b53582f22bec670e0284238376160
BLAKE2b-256 checksum
How to use checksums
be0f3ce268c17243662136c4b532ab1a10f96c27bbcfa1b141a98fd1d3d6a024
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for hg-credentials 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page