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

Commit49fae96

Browse files
authored
Merge pull request#1624 from axl89/docs-clarification
Clarified CI Job Token auth() caveats
2 parents7753fa2 +3f423ef commit49fae96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎docs/api-usage.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ To connect to GitLab.com or another GitLab instance, create a ``gitlab.Gitlab``
2929
gl= gitlab.Gitlab('https://gitlab.example.com',oauth_token='my_long_token_here')
3030
3131
# job token authentication (to be used in CI)
32+
# bear in mind the limitations of the API endpoints it supports:
33+
# https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html
3234
import os
3335
gl= gitlab.Gitlab('https://gitlab.example.com',job_token=os.environ['CI_JOB_TOKEN'])
3436
3537
# Define your own custom user agent for requests
3638
gl= gitlab.Gitlab('https://gitlab.example.com',user_agent='my-package/1.0.0')
3739
3840
# make an API request to create the gl.user object. This is mandatory if you
39-
# use the username/password authentication.
41+
# use the username/password authentication - not required for token authentication,
42+
# and will not work with job tokens.
4043
gl.auth()
4144
4245
You can also use configuration files to create ``gitlab.Gitlab`` objects:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp