aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgit/repos/main.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-27 11:38:13 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-29 00:45:48 +0300
commitf871f899dfd95f781bc76084ad3235f72e2ebff0 (patch)
tree67b0c2387a8eb230582d139e61eabe2ba1f408dc /cgit/repos/main.py
parentcgit-repos.conf: path to output might be relative (diff)
downloadcgitize-f871f899dfd95f781bc76084ad3235f72e2ebff0.tar.gz
cgitize-f871f899dfd95f781bc76084ad3235f72e2ebff0.zip
add the "ssh" config entry
Diffstat (limited to 'cgit/repos/main.py')
-rw-r--r--cgit/repos/main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cgit/repos/main.py b/cgit/repos/main.py
index bc8fa72..e5e390f 100644
--- a/cgit/repos/main.py
+++ b/cgit/repos/main.py
@@ -78,6 +78,10 @@ class Config:
return self.impl.get('DEFAULT', 'owner', fallback=None)
@property
+ def via_ssh(self):
+ return self.impl.getboolean('DEFAULT', 'ssh', fallback=Repo.DEFAULT_VIA_SSH)
+
+ @property
def github_username(self):
return self.impl.get('GITHUB', 'username', fallback=None)
@@ -87,6 +91,7 @@ class Config:
def set_defaults(self):
Repo.DEFAULT_OWNER = self.default_owner
+ Repo.DEFAULT_VIA_SSH = self.via_ssh
GithubRepo.DEFAULT_USER = self.github_username
BitbucketRepo.DEFAULT_USER = self.bitbucket_username