Show More
@@ -238,6 +238,12 b' ssh_enabled = false' | |||||
238 | ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. |
|
238 | ## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve. | |
239 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli |
|
239 | #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli | |
240 |
|
240 | |||
|
241 | ## Locale to be used in the ssh-serve command. | |||
|
242 | ## This is needed because an SSH client may try to use its own locale | |||
|
243 | ## settings, which may not be available on the server. | |||
|
244 | ## See `locale -a` for valid values on this system. | |||
|
245 | #ssh_locale = C.UTF-8 | |||
|
246 | ||||
241 | #################################### |
|
247 | #################################### | |
242 | ### CELERY CONFIG #### |
|
248 | ### CELERY CONFIG #### | |
243 | #################################### |
|
249 | #################################### |
@@ -45,6 +45,11 b' def ssh_serve(user_id, key_id):' | |||||
45 | sys.stderr.write("SSH access is disabled.\n") |
|
45 | sys.stderr.write("SSH access is disabled.\n") | |
46 | return sys.exit(1) |
|
46 | return sys.exit(1) | |
47 |
|
47 | |||
|
48 | ssh_locale = kallithea.CONFIG.get('ssh_locale') | |||
|
49 | if ssh_locale: | |||
|
50 | os.environ['LC_ALL'] = ssh_locale # trumps everything, including LANG, except LANGUAGE | |||
|
51 | os.environ['LANGUAGE'] = ssh_locale # trumps LC_ALL for GNU gettext message handling | |||
|
52 | ||||
48 | ssh_original_command = os.environ.get('SSH_ORIGINAL_COMMAND', '') |
|
53 | ssh_original_command = os.environ.get('SSH_ORIGINAL_COMMAND', '') | |
49 | connection = re.search('^([\d\.]+)', os.environ.get('SSH_CONNECTION', '')) |
|
54 | connection = re.search('^([\d\.]+)', os.environ.get('SSH_CONNECTION', '')) | |
50 | client_ip = connection.group(1) if connection else '0.0.0.0' |
|
55 | client_ip = connection.group(1) if connection else '0.0.0.0' |
@@ -341,6 +341,12 b' ssh_authorized_keys = ${user_home_path}/' | |||||
341 | kallithea_cli_path = ${kallithea_cli_path} |
|
341 | kallithea_cli_path = ${kallithea_cli_path} | |
342 | %endif |
|
342 | %endif | |
343 |
|
343 | |||
|
344 | <%text>## Locale to be used in the ssh-serve command.</%text> | |||
|
345 | <%text>## This is needed because an SSH client may try to use its own locale</%text> | |||
|
346 | <%text>## settings, which may not be available on the server.</%text> | |||
|
347 | <%text>## See `locale -a` for valid values on this system.</%text> | |||
|
348 | #ssh_locale = C.UTF-8 | |||
|
349 | ||||
344 | <%text>####################################</%text> |
|
350 | <%text>####################################</%text> | |
345 | <%text>### CELERY CONFIG ####</%text> |
|
351 | <%text>### CELERY CONFIG ####</%text> | |
346 | <%text>####################################</%text> |
|
352 | <%text>####################################</%text> |
General Comments 0
You need to be logged in to leave comments.
Login now