diff --git a/gitosis/principals.py b/gitosis/principals.py index d5a46c7..e4c9665 100644 --- a/gitosis/principals.py +++ b/gitosis/principals.py @@ -22,7 +22,7 @@ def serve_principal(cfg, sshUser, principals): +'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s') for p in util.getAllowedSSHPrincipals(config=cfg).split() : - print TEMPLATE % dict(user=sshUser, principals=p) + print TEMPLATE % dict(user=sshUser.partition('@')[0], principals=p) class Main(app.App): def create_parser(self): @@ -46,10 +46,3 @@ class Main(app.App): #log.debug('serve_principal: %s', serve_principal(cfg, sshUser, principals)) serve_principal(cfg, sshUser, principals) log.info('Done.') -# -# if hook == 'post-update': -# log.info('Running hook %s', hook) -# post_update(cfg, git_dir) -# log.info('Done.') -# else: -# log.warning('Ignoring unknown hook: %r', hook) diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py index adb1f50..903d40a 100644 --- a/gitosis/run_hook.py +++ b/gitosis/run_hook.py @@ -66,7 +66,6 @@ class Main(app.App): os.umask(0022) git_dir = os.environ.get('GIT_DIR') - print type(git_dir) if git_dir is None: log.error('Must have GIT_DIR set in enviroment') sys.exit(1) diff --git a/gitosis/ssh.py b/gitosis/ssh.py index a315a5c..6b95ceb 100644 --- a/gitosis/ssh.py +++ b/gitosis/ssh.py @@ -62,6 +62,7 @@ def filterAuthorizedKeys(fp): def writeAuthorizedKeys(path, keydir): tmp = '%s.%d.tmp' % (path, os.getpid()) + log.debug("writeAuthorizedKeys " + str(tmp) ) try: in_ = file(path) except IOError, e: