diff --git a/kallithea/bin/kallithea_cli_ssh.py b/kallithea/bin/kallithea_cli_ssh.py --- a/kallithea/bin/kallithea_cli_ssh.py +++ b/kallithea/bin/kallithea_cli_ssh.py @@ -69,7 +69,7 @@ def ssh_serve(user_id, key_id): vcs_handler = VcsHandler.make(ssh_command_parts) if vcs_handler is not None: vcs_handler.serve(user_id, key_id, client_ip) - assert False # serve is written so it never will terminate + sys.exit(0) sys.stderr.write("This account can only be used for repository access. SSH command %r is not supported.\n" % ssh_original_command) sys.exit(1) diff --git a/kallithea/lib/vcs/ssh/base.py b/kallithea/lib/vcs/ssh/base.py --- a/kallithea/lib/vcs/ssh/base.py +++ b/kallithea/lib/vcs/ssh/base.py @@ -96,7 +96,7 @@ class BaseSshHandler(object): # on Git, or through the 'outgoing' Mercurial hook) is hardcoded to # ignore the environment action and always use 'pull'. set_hook_environment(self.authuser.username, client_ip, self.repo_name, self.vcs_type, 'push') - return self._serve() + self._serve() def _serve(self): """Serve the native protocol for repository access."""