Page 1 of 1

git server

Posted: 01 Jun 2019 23:06
by Naoyuki Tai
I installed "git" and am running git server on my server.

I created "git" group and user. Set up the home directory for git, and set up the ssh authorized_keys for RSA auth.

Only thing I couldn't do was to set the login shell to git-shell. So, I hacked /usr/local/www/access_user_edit.php

Code: Select all

*** access_users_edit.php.orig	2018-11-11 05:43:42.000000000 +0000
--- access_users_edit.php	2019-06-01 20:14:57.350303000 +0000
***************
*** 239,245 ****
  				'sh' => 'sh',
  				'bash' => 'bash',
  				'csh' => 'csh',
! 				'tcsh' => 'tcsh'
  			];
  			html_radiobox2('shell',gettext('Shell'),$pconfig['shell'],$l_shell,gettext('Set user login shell.'),true);
  			$l_grouplist = [];
--- 239,247 ----
  				'sh' => 'sh',
  				'bash' => 'bash',
  				'csh' => 'csh',
! 				'tcsh' => 'tcsh',
! 				'ksh' => 'ksh',
! 				'git-shell' => 'git-shell'
  			];
  			html_radiobox2('shell',gettext('Shell'),$pconfig['shell'],$l_shell,gettext('Set user login shell.'),true);
  			$l_grouplist = [];

If the shell list is filled out from /etc/shells this wouldn't be necessary. (I added ksh as well as I am used to ksh.)
This allows git server to work with relatively easy steps. Also, if this becomes the standard feature and can be done with a single page web GUI, it would be wonderful.