Show More
@@ -1,4 +1,4 b'' | |||
|
1 | .. -*- mode: rst -*- | |
|
1 | .. -*- mode: rst; compile-command: "rst2html README.txt README.html" -*- | |
|
2 | 2 | |
|
3 | 3 | ================= |
|
4 | 4 | mercurial_keyring |
@@ -18,12 +18,13 b' How does it work' | |||
|
18 | 18 | |
|
19 | 19 | The extension prompts for the password on the first pull/push (in case |
|
20 | 20 | of HTTP) or first email (in case of SMTP), just like it is done by |
|
21 |
default, but saves the password. On successive |
|
|
22 | username in ``.hg/hgrc``, then for suitable password in the password | |
|
23 | database, and uses those credentials (if found). | |
|
21 | default, but saves the password in password database. On successive | |
|
22 | runs, whenever the password is needed, it checks for the username in | |
|
23 | ``.hg/hgrc``, then for suitable password in the password database, and | |
|
24 | uses those credentials (if found). | |
|
24 | 25 | |
|
25 | 26 | In case password turns out to be incorrect (either because it was |
|
26 | invalid, or because it was changed on the server) or missing it just | |
|
27 | invalid, or because it was changed on the server) or missing, it just | |
|
27 | 28 | prompts the user again. |
|
28 | 29 | |
|
29 | 30 | Passwords are identified by the combination of username and remote |
@@ -36,48 +37,60 b' Installation' | |||
|
36 | 37 | Prerequisites |
|
37 | 38 | ------------- |
|
38 | 39 | |
|
39 | Install the keyring_ library: | |
|
40 | This extension requires keyring_ and `mercurial_extension_utils`_ to | |
|
41 | work. In many cases both will be installed automatically while you | |
|
42 | install `mercurial_keyring`_, but you may need to control the process. | |
|
43 | ||
|
44 | The keyring_ library can usually be installed by:: | |
|
40 | 45 | |
|
41 | :: | |
|
46 | pip install --user keyring | |
|
42 | 47 | |
|
43 | easy_install keyring | |
|
48 | (or ``easy_install keyring``), but on some systems it is preferable to | |
|
49 | use official distribution archive. For example, on Debian and Ubuntu, | |
|
50 | you may install ``python-keyring`` and either ``python-keyring-gnome`` | |
|
51 | or ``python-keyring-kwallet`` packages:: | |
|
44 | 52 | |
|
45 | (or ``pip keyring``). On Debian "Sid" the library can be also | |
|
46 | installed from the official archive (packages ``python-keyring`` | |
|
47 | and either ``python-keyring-gnome`` or ``python-keyring-kwallet``). | |
|
53 | sudo apt-get install python-keyring python-keyring-gnome | |
|
54 | ||
|
55 | (this will save you the need to provide working compiler and various | |
|
56 | development libraries). | |
|
48 | 57 | |
|
49 | Note: keyring >= 0.3 is strongly recommended, especially in case text | |
|
50 | backend is to be used. | |
|
58 | The `mercurial_extension_utils`_ module is tiny Python-only module, | |
|
59 | which can be installed by:: | |
|
51 | 60 | |
|
52 | .. _this keyring fork: https://bitbucket.org/sborho/python-keyring-lib | |
|
61 | pip install --user mercurial_extension_utils | |
|
62 | ||
|
63 | but in some cases (Windows…) require more care. See `mercurial_extension_utils`_ documentation. | |
|
64 | ||
|
53 | 65 | |
|
54 | 66 | Extension installation |
|
55 | 67 | ---------------------- |
|
56 | 68 | |
|
57 | 69 | There are two possible ways of installing the extension: using PyPi package, |
|
58 | or using individual file. | |
|
70 | or using source clone. | |
|
59 | 71 | |
|
60 |
To install as a package |
|
|
61 | ||
|
62 | :: | |
|
72 | To install as a package:: | |
|
63 | 73 | |
|
64 |
|
|
|
74 | pip install --user mercurial_keyring | |
|
65 | 75 | |
|
66 | and then enable it in ``~/.hgrc`` (or ``/etc/mercurial/hgrc``) using: | |
|
67 | ||
|
68 | :: | |
|
76 | (or ``sudo pip install mercurial_keyring`` for system-wide | |
|
77 | installation) and then enable it in ``~/.hgrc`` (or | |
|
78 | ``/etc/mercurial/hgrc`` or ``Mercurial.ini``) using:: | |
|
69 | 79 | |
|
70 | 80 | [extensions] |
|
71 | 81 | mercurial_keyring = |
|
72 | 82 | |
|
73 | To install using individual file, download the | |
|
74 | `mercurial_keyring.py`_ file, save it anywhere you like, and | |
|
75 | put the following in ``~/.hgrc`` (or ``/etc/mercurial/hgrc``): | |
|
83 | To install as source clone, install keyring_ according to instructions above, then | |
|
84 | clone:: | |
|
85 | ||
|
86 | hg clone https://bitbucket.org/Mekk/mercurial_keyring/ | |
|
87 | hg clone https://bitbucket.org/Mekk/mercurial-extension_utils/ | |
|
76 | 88 | |
|
77 | :: | |
|
89 | and configure Mercurial by telling it full path to the extension | |
|
90 | (in ):: | |
|
78 | 91 | |
|
79 | 92 | [extensions] |
|
80 |
|
|
|
93 | mercurial_keyring = /path/to/mercurial_keyring/mercurial_keyring.py | |
|
81 | 94 | |
|
82 | 95 | .. _the code: |
|
83 | 96 | .. _mercurial_keyring.py: http://bitbucket.org/Mekk/mercurial_keyring/src/tip/mercurial_keyring.py |
@@ -204,3 +217,6 b' Information about this extension is also' | |||
|
204 | 217 | on Mercurial Wiki: http://mercurial.selenic.com/wiki/KeyringExtension |
|
205 | 218 | |
|
206 | 219 | .. _HISTORY.txt: http://bitbucket.org/Mekk/mercurial_keyring/src/tip/HISTORY.txt |
|
220 | .. _TortoiseHg: http://tortoisehg.bitbucket.org/ | |
|
221 | .. _Mercurial: http://mercurial.selenic.com | |
|
222 | .. _mercurial_extension_utils: https://bitbucket.org/Mekk/mercurial-extension_utils/ |
General Comments 0
You need to be logged in to leave comments.
Login now