PageRenderTime 25ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

Plain Text | 53 lines | 37 code | 16 blank | 0 comment | 0 complexity | 65abf345aaa9a65a0cb86b9b0a1f89bf MD5 | raw file
  1. About
  2. =====
  3. hgkeychain is an extension for mercurial that lets the user use the MacOS X keychain to store passwords for remote repositories.
  4. Requirements
  5. ============
  6. Mac OS X 10.5+ (should work on older OSes but only tested on 10.5 and 10.6)
  7. Python 2.5 (should work on older versions of Python but only tested on 2.5 and 2.6)
  8. Mercurial 0.9+ (works on 1.0 through 1.3)
  9. My pykeychain Python Module
  10. Installation
  11. ============
  12. The easiest way to install hgkeychain is to use easy_install or pip:
  13. sudo easy_install -U pykeychain
  14. (The sudo command may be optional depending on your machine's set up)
  15. Activation
  16. ==========
  17. Edit your ~/.hgrc file to activate the extension:
  18. [extensions]
  19. hgkeychain=
  20. See for more information on installing and activating mercurial extensions.
  21. Usage
  22. =====
  23. Once properly installed and activated hgkeychain will allow mercurial to store and retrieve repository passwords using the user's keychain.
  24. You should generally embed the remote repository's username in the repository URL when performing a clone, push or pull operation. E.g.:
  26. If you try to clone, push or pull to a password protected repository mercurial will query the user's Keychain for the repository password. If no password is found, mercurial will prompt the user for the password (via the terminal) and then store the password in the Keychain.
  27. Configuration
  28. =============
  29. hgkeychain is aware of [auth] settings in your ~/.hgrc. For example, if you have a BitBucket account, you could set this up as such:
  30. [auth]
  31. bb.prefix =
  32. bb.username = {username}
  33. bb.schemes = http https
  34. The prefix is used to store your password in keychain, so all repositories with the same prefix will share the same keychain item. This keeps your keychain from getting cluttered up with a single keychain item per repository. Note that [auth] requires at least Mercurial verion 1.3. The old URL replacement regular expressions have been removed in support of [auth].
  35. You can turn on logging to help debug problems like so:
  36. [hgkeychain]
  37. logging=1