Changeset - 267c0dbcddd3
[Not reviewed]
default
0 2 0
Mads Kiilerich - 6 years ago 2019-06-22 19:46:25
mads@kiilerich.com
kallithea-cli: set ssh_authorized_keys when creating .ini file so it doesn't have to be set manually before using ssh

The user that is creating the .ini will be / should be the kallithea user that also will be used at runtime.
2 files changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/kallithea_cli_config.py
Show inline comments
 
@@ -59,12 +59,13 @@ def config_create(config_file, key_value
 
    section ... until another section name specifies where any following values
 
    should go.
 
    """
 

	
 
    mako_variable_values = {
 
        'git_hook_interpreter': sys.executable,
 
        'user_home_path': os.path.expanduser('~'),
 
    }
 
    ini_settings = defaultdict(dict)
 

	
 
    section_name = None
 
    for parameter in key_value_pairs:
 
        parts = parameter.split('=', 1)
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -328,12 +328,15 @@ allow_custom_hooks_settings = True
 

	
 
<%text>## SSH is disabled by default, until an Administrator decides to enable it.</%text>
 
ssh_enabled = false
 

	
 
<%text>## File where users' SSH keys will be stored *if* ssh_enabled is true.</%text>
 
#ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
 
%if user_home_path:
 
ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys
 
%endif
 

	
 
<%text>## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.</%text>
 
#kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
 

	
 
<%text>####################################</%text>
 
<%text>###        CELERY CONFIG        ####</%text>
0 comments (0 inline, 0 general)