DEV Community

KOGA Mitsuhiro
KOGA Mitsuhiro

Posted on • Originally published at qiita.com

Mercurialで安全にパスワードを保存する

Mercurialでパスワードを保存するには、以下のように記述する方法があります。

[auth]
example.com.prefix = https://example.com
example.com.user = xxxxxxx
example.com.password = xxxxxxx

ですが、生パスワードを記述するので安全とは言えません。
そこでMercurial-Keyring拡張を使います。
以下のように、この拡張を有効にしてパスワード設定を削除しておくと、初回のみパスワード入力を要求されてパスワードデータデースに保存されます。
次回からはパスワードデータデースを利用するため安全にパスワードを保管できます。

[extensions]
mercurial_keyring = /path/to/mercurial_keyring.py

[auth]
example.com.prefix = https://example.com
example.com.user = xxxxxxx

Windows版のTortoiseHGはこの拡張が同梱されているので、以下の設定だけで有効にできます。

[extensions]
mercurial_keyring =

その他、パスワードの保存先など詳しくはTortoiseHg v1.0.0 documentation/8.5. Mercurial-Keyringに記載されているので参考にしてください。

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay