diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-03 15:22:11 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-11-03 15:22:11 +0100 |
commit | fa897468cf565fb8546b47637cd9703981aedbc0 (patch) | |
tree | 613693669de27c69414bb754aa3b729db58261a0 | |
parent | 226e6ce9e5217367c896125a2b4b9d16afd2cf94 (diff) | |
download | gitlab-fa897468cf565fb8546b47637cd9703981aedbc0.tar.gz |
[doc] Add sample code for client-side certificates
Closes #23
-rw-r--r-- | docs/api-usage.rst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst index ad188ce..edd41d0 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -253,6 +253,9 @@ HTTP requests to the Gitlab servers. You can provide your own ``Session`` object with custom configuration when you create a ``Gitlab`` object. +Proxy configuration +------------------- + The following sample illustrates how to define a proxy configuration when using python-gitlab: @@ -267,3 +270,23 @@ python-gitlab: 'http': os.environ.get('http_proxy'), } gl = gitlab.gitlab(url, token, api_version=4, session=session) + +Reference: +http://docs.python-requests.org/en/master/user/advanced/#proxies + +Client side certificate +----------------------- + +The following sample illustrates how to use a client-side certificate: + +.. code-block:: python + + import gitlab + import requests + + session = requests.Session() + s.cert = ('/path/to/client.cert', '/path/to/client.key') + gl = gitlab.gitlab(url, token, api_version=4, session=session) + +Reference: +http://docs.python-requests.org/en/master/user/advanced/#client-side-certificates |