diff options
-rw-r--r-- | gitosis/init.py | 1 | ||||
-rw-r--r-- | gitosis/sshkey.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/gitosis/init.py b/gitosis/init.py index 105ac4c..ceeaba6 100644 --- a/gitosis/init.py +++ b/gitosis/init.py @@ -140,6 +140,7 @@ class Main(app.App): user = _.username else: user = options.adminname + user = user.strip() if user is None: log.error('Cannot parse user from SSH public key.') sys.exit(1) diff --git a/gitosis/sshkey.py b/gitosis/sshkey.py index 145d746..802145b 100644 --- a/gitosis/sshkey.py +++ b/gitosis/sshkey.py @@ -141,7 +141,7 @@ def _explode_ssh_key(line): Seperately return the options, key data and comment. """ opts = {} - shl = shlex(StringIO(line), None, True) + shl = shlex(StringIO(line.strip()), None, True) shl.wordchars += '-' # Treat ',' as whitespace seperation the options shl.whitespace += ',' |