File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ Here's an example of the syntax:
69
69
`````
70
70
[global]
71
71
default = local
72
+ ssl_verify = true
72
73
73
74
[local]
74
75
url = http://10.0.3.2:8080
@@ -77,12 +78,16 @@ private_token = vTbFeqJYCY3sibBP7BZM
77
78
[distant]
78
79
url = https://some.whe.re
79
80
private_token = thisisaprivatetoken
81
+ ssl_verify = false
80
82
`````
81
83
82
84
The [ global] section define which server is accesed by default.
83
85
Each other section defines how to access a server. Only private token
84
86
authentication is supported (not user/password).
85
87
88
+ The ` ssl_verify ` option defines if the server SSL certificate should be
89
+ validated (use false for self signed certificates, only useful with https).
90
+
86
91
Choosing a different server than the default one can be done at run time:
87
92
88
93
`````
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def usage():
126
126
127
127
def do_auth ():
128
128
try :
129
- gl = gitlab .Gitlab (gitlab_url , private_token = gitlab_token )
129
+ gl = gitlab .Gitlab (gitlab_url , private_token = gitlab_token , ssl_verify = ssl_verify )
130
130
gl .auth ()
131
131
except :
132
132
die ("Could not connect to GitLab (%s)" % gitlab_url )
@@ -204,6 +204,7 @@ def do_update(cls, d):
204
204
return o
205
205
206
206
207
+ ssl_verify = True
207
208
gitlab_id = None
208
209
verbose = False
209
210
@@ -272,6 +273,15 @@ try:
272
273
except :
273
274
die ("Impossible to get gitlab informations from configuration (%s)" % gitlab_id )
274
275
276
+ try :
277
+ ssl_verify = config .getboolean ('global' , 'ssl_verify' )
278
+ except :
279
+ pass
280
+ try :
281
+ ssl_verify = config .getboolean (gitlab_id , 'ssl_verify' )
282
+ except :
283
+ pass
284
+
275
285
try :
276
286
what = args .pop (0 )
277
287
action = args .pop (0 )
You can’t perform that action at this time.
0 commit comments