diff --git a/cobra/utils.py b/cobra/utils.py index f3e7b656..81a20aa9 100644 --- a/cobra/utils.py +++ b/cobra/utils.py @@ -134,7 +134,8 @@ def target_directory(self, target_mode): target, branch = self.target, 'master' else: logger.critical('Target url exception: {u}'.format(u=self.target)) - if 'gitlab' in target: + domain = Config('git', 'domain').value + if domain in target: username = Config('git', 'username').value password = Config('git', 'password').value else: diff --git a/config.template b/config.template index d9a6bef8..a8893692 100644 --- a/config.template +++ b/config.template @@ -52,6 +52,7 @@ password: [git] username: password: +domain: private_token: # http://xxx.gitlab.com/api/v3/projects/all gitlab_url: