Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa89746

Browse files
author
Gauvain Pocentek
committed
[doc] Add sample code for client-side certificates
Closes#23
1 parent226e6ce commitfa89746

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

‎docs/api-usage.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ HTTP requests to the Gitlab servers.
253253
You can provide your own ``Session`` object with custom configuration when
254254
you create a ``Gitlab`` object.
255255

256+
Proxy configuration
257+
-------------------
258+
256259
The following sample illustrates how to define a proxy configuration when using
257260
python-gitlab:
258261

@@ -267,3 +270,23 @@ python-gitlab:
267270
'http': os.environ.get('http_proxy'),
268271
}
269272
gl= gitlab.gitlab(url, token,api_version=4,session=session)
273+
274+
Reference:
275+
http://docs.python-requests.org/en/master/user/advanced/#proxies
276+
277+
Client side certificate
278+
-----------------------
279+
280+
The following sample illustrates how to use a client-side certificate:
281+
282+
..code-block::python
283+
284+
import gitlab
285+
import requests
286+
287+
session= requests.Session()
288+
s.cert= ('/path/to/client.cert','/path/to/client.key')
289+
gl= gitlab.gitlab(url, token,api_version=4,session=session)
290+
291+
Reference:
292+
http://docs.python-requests.org/en/master/user/advanced/#client-side-certificates

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp