Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2008-09-24 04:20:55
Size: 1543
Editor: MartinBlais
Comment:
Revision 6 as of 2015-05-08 15:42:13
Size: 1551
Editor: rcl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== DefPasswd Extension == #pragma section-numbers 2

= DefPasswd Extension =
Line 7: Line 9:
Download site: [http://furius.ca/pubcode/pub/conf/common/lib/python/hgblais/defpasswd.py] Source code: [[http://furius.ca/pubcode/pub/conf/lib/python/hgblais/defpasswd.py]]
Line 9: Line 11:
Home page: [http://furius.ca/pubcode/pub/conf/common/lib/python/hgblais/defpasswd.py.html] Web page: [[http://furius.ca/pubcode/pub/conf/lib/python/hgblais/defpasswd.py.html]]
Line 11: Line 13:
Works with: Mercurial 0.9.5 and beyond. Compatibility: Mercurial 0.9.5 and beyond.
Line 13: Line 15:

=
== Overview ===
== Overview ==
Line 19: Line 20:
[:Repository:repositories]. If you are regularly pushing from/pulling [[Repository|repositories]]. If you are regularly pushing from/pulling
Line 39: Line 40:
=== Configuration ===
Configure your [:.hgrc:.hgrc] to enable the extension by adding following lines:
== Configuration ==
Configure your [[.hgrc]] to enable the extension by adding following lines:
Line 49: Line 50:
=== Usage Scenario === == Usage Scenario ==
Line 53: Line 54:


Line 57: Line 55:
CategoryExtension CategoryExtensionsByOthers

DefPasswd Extension

This extension is not distributed with Mercurial.

Author: Martin Blais

Source code: http://furius.ca/pubcode/pub/conf/lib/python/hgblais/defpasswd.py

Web page: http://furius.ca/pubcode/pub/conf/lib/python/hgblais/defpasswd.py.html

Compatibility: Mercurial 0.9.5 and beyond.

1. Overview

Automatically provide credentials (username/passwords) read from a file.

This is useful to avoid having to type in your password in some repositories. If you are regularly pushing from/pulling into a checkout that is in a shared or public space, and you don't feel comfortable placing your username/password in the .hg/hgrc URL, where others who have access can read them, you can use this to automatically supply the credentials.

The format of the password file is::

  realm, uri, username, password
  realm, uri, username, password
  ...

The location of the file is '~/.hgpasswd' by default and can be overridden with the environment variable 'HGPASSWD'.

Future work: we could support encrypted files decrypted using gpg (and gpg-agent to avoid having to type your password).

2. Configuration

Configure your .hgrc to enable the extension by adding following lines:

[extensions]
defpasswd =

Place defpasswd.py somewhere accessible from your PYTHONPATH.

3. Usage Scenario

Pull or push a repository without having to enter your username/password.


CategoryExtensionsByOthers

DefpasswdExtension (last edited 2015-05-08 15:42:13 by rcl)