Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lovelysystems/lovely.buildouthttp
zc.buildout extension to add http authentication for find-links and download recipies
https://github.com/lovelysystems/lovely.buildouthttp
Last synced: 3 months ago
JSON representation
zc.buildout extension to add http authentication for find-links and download recipies
- Host: GitHub
- URL: https://github.com/lovelysystems/lovely.buildouthttp
- Owner: lovelysystems
- License: other
- Created: 2010-10-09T05:54:20.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2015-06-10T11:34:49.000Z (over 9 years ago)
- Last Synced: 2024-10-11T10:08:44.804Z (4 months ago)
- Language: Python
- Homepage:
- Size: 300 KB
- Stars: 4
- Watchers: 17
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
=========================
HTTP plugins for buildout
=========================HTTP Basic-Authentication
=========================With this extension it is possible to define password protected
package directories without specifying the password and user in the
url.Let's take the example protected location, ``http://www.example.com/dist``
First we would need to add the extension and the find link for our
protected location::[buildout]
find-links = http://www.example.com/dist
extensions = lovely.buildouthttpThen create the ``.httpauth`` password file, this file contains all
authentication information. The ``.httpauth`` file can be placed in the root of
the current buildout or in the ``~/.buildout`` directory. Each row consists of
``realm, uri, username, password``.Here is an example of the ``.httpauth`` file::
Example com realm, http://www.example.com, username, secret
It is also possible to leave the secret away. Then you will be prompted for the
secret whenever buildout is run::Example com realm, http://www.example.com, username
Note that basic auth also works with any recipe using
zc.buildout.download (e.g. hexagonit.recipe.download) because this
extension also overwrites the url opener of zc.buildout.Github Private Downloads
========================Private downloads on http://github.com/ require authorization to download.
The previous token-based authentication system based on the v2 API (see
http://github.com/blog/170-token-authentication) is no longer supported by
GitHub as of June 1 2012; You must now request a v3 API token and use that
instead.Requesting a new API token can be done in one line using ``curl`` (please
substitute your own github username and password):curl -s -X POST -d '{"scopes": ["repo"], "note": "my API token"}' \
https://${user}:${pass}@api.github.com/authorizations | grep tokenNow set the value of github.token to the hash returned from the command above:
git config --global github.accesstoken ${token}
Note that the v3 API does not require your github username to work, and can
be removed from your configuration if you wish.For details on managing authorization GitHub's OAuth tokens, see the API
documentation: http://developer.github.com/v3/oauth/#oauth-authorizations-apiURL to download a tag or branch::
https://api.github.com/repos///tarball/master
URL to downlad a "download"::
https://github.com/downloads///
As some eggs on PyPi also use public Github download URLs you may want to
whitelist the repos that authentication is required for as Github will
return a 401 error code even for public repositories if the wrong auth
details are provided.
To do this just list each repo in the format `/` one per
line in the buildout config `github-repos`::[buildout]
extensions = lovely.buildouthttp
github-repos = lovelysystems/lovely.buildouthttp
bitly/asyncmongoCredits
=======Thanks to Tarek Ziade, Kevin Williams and Wesley Mason for bugfixes and extensions.