Skip to content

Commit e83c4b2

Browse files
committed
Merge branch request/76 into devel
2 parents 18a3d4f + 1881dee commit e83c4b2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ Also, you can setup your own GitLab self-hosted server, using that configuration
173173
type = gitlab
174174
token = YourSuperPrivateKey
175175
fqdn = gitlab.example.org
176+
# Set this only if you use a self-signed certificate and experience problems
177+
insecure = true
176178

177179
Finally, to make it really cool, you can make a few aliases in your gitconfig:
178180

git_repo/services/ext/gitlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class GitlabService(RepositoryService):
1616
fqdn = 'gitlab.com'
1717

1818
def __init__(self, *args, **kwarg):
19-
self.gl = gitlab.Gitlab(self.url_ro)
20-
super(GitlabService, self).__init__(*args, **kwarg)
19+
super().__init__(*args, **kwarg)
20+
self.gl = gitlab.Gitlab(self.url_ro, ssl_verify=not self.insecure)
2121

2222
def connect(self):
2323
self.gl.set_url(self.url_ro)

git_repo/services/service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def __init__(self, r=None, c=None):
156156
c.get('privatekey', None))))
157157
self._alias = c.get('alias', self.name)
158158
self.fqdn = c.get('fqdn', self.fqdn)
159+
self.insecure = c.get('insecure', 'false').lower() in ('on', 'true', 'yes', '1')
159160

160161
# if service has a repository configured, connect
161162
if r:

0 commit comments

Comments
 (0)