Show More
@@ -12,22 +12,23 b'' | |||||
12 | mercurial_keyring |
|
12 | mercurial_keyring | |
13 | ================= |
|
13 | ================= | |
14 |
|
14 | |||
15 |
Mercurial extension to securely save HTTP authentication |
|
15 | Mercurial extension to securely save HTTP and SMTP authentication | |
16 |
password databases (Gnome Keyring, KDE KWallet, |
|
16 | passwords in password databases (Gnome Keyring, KDE KWallet, | |
17 |
solutions for Win32 and command line). Uses and |
|
17 | OSXKeyChain, specific solutions for Win32 and command line). Uses and | |
18 | keyring_ library. |
|
18 | wraps services of the keyring_ library. | |
19 |
|
19 | |||
20 | .. _keyring: http://pypi.python.org/pypi/keyring |
|
20 | .. _keyring: http://pypi.python.org/pypi/keyring | |
21 |
|
21 | |||
22 | How does it work |
|
22 | How does it work | |
23 | ================ |
|
23 | ================ | |
24 |
|
24 | |||
25 |
The extension prompts for the password on the first pull/push |
|
25 | The extension prompts for the password on the first pull/push (in case | |
26 | done by default, but saves the given password (keyed by the |
|
26 | of HTTP) or first email (in case of SMTP), just like it is done by | |
27 | combination of username and remote repository url) in the password |
|
27 | default, but saves the given password (keyed by the combination of | |
28 | database. On the next run it checks for the username in ``.hg/hgrc``, |
|
28 | username and remote repository url - for HTTP - or smtp server | |
29 | then for suitable password in the password database, and uses those |
|
29 | address - for SMTP) in the password database. On successive runs it | |
30 | credentials if found. |
|
30 | checks for the username in ``.hg/hgrc``, then for suitable password in the | |
|
31 | password database, and uses those credentials if found. | |||
31 |
|
32 | |||
32 | In case password turns out to be incorrect (either because it was |
|
33 | In case password turns out to be incorrect (either because it was | |
33 | invalid, or because it was changed on the server) it just prompts the |
|
34 | invalid, or because it was changed on the server) it just prompts the | |
@@ -74,8 +75,8 b' the current user). Refer to keyring_ doc' | |||||
74 | single user may use more than one keyring-based script. Still, I am |
|
75 | single user may use more than one keyring-based script. Still, I am | |
75 | open to suggestions.'' |
|
76 | open to suggestions.'' | |
76 |
|
77 | |||
77 | Repository configuration |
|
78 | Repository configuration (HTTP) | |
78 | ======================== |
|
79 | =============================== | |
79 |
|
80 | |||
80 | Edit repository-local ``.hg/hgrc`` and save there the remote |
|
81 | Edit repository-local ``.hg/hgrc`` and save there the remote | |
81 | repository path and the username, but do not save the password. For |
|
82 | repository path and the username, but do not save the password. For | |
@@ -103,13 +104,40 b' extension will use them without using th' | |||||
103 | username is not given, extension will prompt for credentials every |
|
104 | username is not given, extension will prompt for credentials every | |
104 | time, also without saving the password. |
|
105 | time, also without saving the password. | |
105 |
|
106 | |||
|
107 | Repository configuration (SMTP) | |||
|
108 | =============================== | |||
|
109 | ||||
|
110 | Edit either repository-local ``.hg/hgrc``, or ``~/.hgrc`` and set | |||
|
111 | there all standard email and smtp properties, including smtp | |||
|
112 | username, but without smtp password. For example: | |||
|
113 | ||||
|
114 | :: | |||
|
115 | ||||
|
116 | [email] | |||
|
117 | method = smtp | |||
|
118 | from = Joe Doe <Joe.Doe@remote.com> | |||
|
119 | ||||
|
120 | [smtp] | |||
|
121 | host = smtp.gmail.com | |||
|
122 | port = 587 | |||
|
123 | username = JoeDoe@gmail.com | |||
|
124 | tls = true | |||
|
125 | ||||
|
126 | Just as in case of HTTP, you *must* set username, but *must not* set | |||
|
127 | password here to use the extension, in other cases it will revert to | |||
|
128 | the default behaviour. | |||
|
129 | ||||
106 | Usage |
|
130 | Usage | |
107 | ===== |
|
131 | ===== | |
108 |
|
132 | |||
109 |
Configure the repository as above, then just pull |
|
133 | Configure the repository as above, then just pull, push, etc. | |
110 | You should be asked for the password only once (per every |
|
134 | You should be asked for the password only once (per every | |
111 | username+remote_repository_url combination). |
|
135 | username+remote_repository_url combination). | |
112 |
|
136 | |||
|
137 | Similarly, for email, configure as above and just email. | |||
|
138 | Again, you will be asked for the password once (per every | |||
|
139 | username+email_server_name+email_server_port). | |||
|
140 | ||||
113 | Implementation details |
|
141 | Implementation details | |
114 | ====================== |
|
142 | ====================== | |
115 |
|
143 |
General Comments 0
You need to be logged in to leave comments.
Login now