FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-gitlab/docs/gl_objects/deploy_keys.py at master · joejulian/python-gitlab · GitHub
joejulian
python-gitlab
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
deploy_keys.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (37 loc) · 870 Bytes
Breadcrumbs
python-gitlab
/
docs
/
gl_objects
/
deploy_keys.py
Copy path
File metadata and controls
44 lines (37 loc) · 870 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# global list
keys
=
gl
.
keys
.
list
()
# end global list
# global get
key
=
gl
.
keys
.
get
(
key_id
)
# end global get
# list
keys
=
gl
.
project_keys
.
list
(
project_id
=
1
)
# or
keys
=
project
.
keys
.
list
()
# end list
# get
key
=
gl
.
project_keys
.
get
(
key_id
,
project_id
=
1
)
# or
key
=
project
.
keys
.
get
(
key_id
)
# end get
# create
key
=
gl
.
project_keys
.
create
({
'title'
:
'jenkins key'
,
'key'
:
open
(
'/home/me/.ssh/id_rsa.pub'
).
read
()},
project_id
=
1
)
# or
key
=
project
.
keys
.
create
({
'title'
:
'jenkins key'
,
'key'
:
open
(
'/home/me/.ssh/id_rsa.pub'
).
read
()})
# end create
# delete
key
=
gl
.
project_keys
.
delete
(
key_id
,
project_id
=
1
)
# or
key
=
project
.
keys
.
list
(
key_id
)
# or
key
.
delete
()
# end delete
# enable
project
.
keys
.
enable
(
key_id
)
# end enable
# disable
project
.
keys
.
disable
(
key_id
)
# end disable
Back
|
FazBrowse Home
|
New Git URL