# HG changeset patch # User Mads Kiilerich # Date 1561225585 -7200 # Node ID 267c0dbcddd30a75064f5535437b813fec9d9d97 # Parent b27e515df83cec73954e98fbae45d445bc35e37f 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. diff -r b27e515df83c -r 267c0dbcddd3 kallithea/bin/kallithea_cli_config.py --- a/kallithea/bin/kallithea_cli_config.py Mon Nov 17 14:42:45 2014 -0500 +++ b/kallithea/bin/kallithea_cli_config.py Sat Jun 22 19:46:25 2019 +0200 @@ -62,6 +62,7 @@ mako_variable_values = { 'git_hook_interpreter': sys.executable, + 'user_home_path': os.path.expanduser('~'), } ini_settings = defaultdict(dict) diff -r b27e515df83c -r 267c0dbcddd3 kallithea/lib/paster_commands/template.ini.mako --- a/kallithea/lib/paster_commands/template.ini.mako Mon Nov 17 14:42:45 2014 -0500 +++ b/kallithea/lib/paster_commands/template.ini.mako Sat Jun 22 19:46:25 2019 +0200 @@ -331,6 +331,9 @@ <%text>## File where users' SSH keys will be stored *if* ssh_enabled is true. #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. #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli