aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--cgitize/config.py8
-rw-r--r--cgitize/repo.py8
-rw-r--r--examples/cgitize.toml2
3 files changed, 9 insertions, 9 deletions
diff --git a/cgitize/config.py b/cgitize/config.py
index c207597..8302f29 100644
--- a/cgitize/config.py
+++ b/cgitize/config.py
@@ -46,12 +46,12 @@ class MainSection(Section):
return self._get_config_value('clone_url', required=False)
@property
- def default_owner(self):
- return self._get_config_value('owner', required=False)
+ def clone_via_ssh(self):
+ return self._get_config_value('clone_via_ssh', default=True)
@property
- def via_ssh(self):
- return self._get_config_value('ssh', default=True)
+ def default_owner(self):
+ return self._get_config_value('owner', required=False)
class GitHubSection(Section):
diff --git a/cgitize/repo.py b/cgitize/repo.py
index d224351..99f39cf 100644
--- a/cgitize/repo.py
+++ b/cgitize/repo.py
@@ -29,8 +29,8 @@ class Repo:
https_url = src.clone_url
ssh_url = src.ssh_url
- clone_url = ssh_url if config.main.via_ssh else https_url
- url_auth = None if config.main.via_ssh else config.github.url_auth
+ clone_url = ssh_url if config.main.clone_via_ssh else https_url
+ url_auth = None if config.main.clone_via_ssh else config.github.url_auth
return Repo(name, clone_url, owner=owner, desc=desc, homepage=homepage,
url_auth=url_auth)
@@ -52,8 +52,8 @@ class Repo:
if len(ssh_urls) != 1: raise RuntimeError(f"no ssh:// clone URL for repository '{name}'?!")
ssh_url = ssh_urls[0]['href']
- clone_url = ssh_url if config.main.via_ssh else https_url
- url_auth = None if config.main.via_ssh else config.bitbucket.url_auth
+ clone_url = ssh_url if config.main.clone_via_ssh else https_url
+ url_auth = None if config.main.clone_via_ssh else config.bitbucket.url_auth
return Repo(name, clone_url, owner=owner, desc=desc, homepage=homepage,
url_auth=url_auth)
diff --git a/examples/cgitize.toml b/examples/cgitize.toml
index 9b55d26..b029328 100644
--- a/examples/cgitize.toml
+++ b/examples/cgitize.toml
@@ -8,7 +8,7 @@ output_dir = "/tmp/cgitize"
clone_url = "https://yourhost.com/git/{name}"
# Clones via SSH by default.
-ssh = true
+clone_via_ssh = true
# Unless this is specified, cgit is going to derive the owner from the
# repository's directory ownership.