git_dir removed

This commit is contained in:
Jakobus Schürz 2019-08-02 01:47:53 +02:00
parent ca4479cdc0
commit e6691d2c49
2 changed files with 2 additions and 6 deletions

Binary file not shown.

View file

@ -17,10 +17,7 @@ from gitosis import app
from gitosis import util from gitosis import util
def serve_principal(cfg, git_dir, sshUser, principals): def serve_principal(cfg, sshUser, principals):
export = os.path.join(git_dir, 'gitosis-export')
# re-read config to get up-to-date settings
cfg.read(os.path.join(export, '..', 'gitosis.conf'))
TEMPLATE=('command="gitosis-serve %(user)s",no-port-forwarding,' TEMPLATE=('command="gitosis-serve %(user)s",no-port-forwarding,'
+'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s') +'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s')
@ -51,14 +48,13 @@ class Main(app.App):
log = logging.getLogger('gitosis.principals') log = logging.getLogger('gitosis.principals')
git_dir = os.environ.get('GIT_DIR')
if git_dir is None: if git_dir is None:
log.error('Must have GIT_DIR set in enviroment') log.error('Must have GIT_DIR set in enviroment')
sys.exit(1) sys.exit(1)
if sshUser != "": if sshUser != "":
log.info('Running serve_principal for user %s', sshUser) log.info('Running serve_principal for user %s', sshUser)
serve_principal(cfg, git_dir, sshUser, principals) serve_principal(cfg, sshUser, principals)
log.info('Done.') log.info('Done.')
# #
# if hook == 'post-update': # if hook == 'post-update':