File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 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:
6969`````
7070[global]
7171default = local
72+ ssl_verify = true
7273
7374[local]
7475url = http://10.0.3.2:8080
@@ -77,12 +78,16 @@ private_token = vTbFeqJYCY3sibBP7BZM
7778[distant]
7879url = https://some.whe.re
7980private_token = thisisaprivatetoken
81+ ssl_verify = false
8082`````
8183
8284The [ global] section define which server is accesed by default.
8385Each other section defines how to access a server. Only private token
8486authentication is supported (not user/password).
8587
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+
8691Choosing a different server than the default one can be done at run time:
8792
8893`````
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def usage():
126126
127127def do_auth ():
128128 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 )
130130 gl .auth ()
131131 except :
132132 die ("Could not connect to GitLab (%s)" % gitlab_url )
@@ -204,6 +204,7 @@ def do_update(cls, d):
204204 return o
205205
206206
207+ ssl_verify = True
207208gitlab_id = None
208209verbose = False
209210
@@ -272,6 +273,15 @@ try:
272273except :
273274 die ("Impossible to get gitlab informations from configuration (%s)" % gitlab_id )
274275
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+
275285try :
276286 what = args .pop (0 )
277287 action = args .pop (0 )
You can’t perform that action at this time.
0 commit comments