]> PHS Git Server - phs-api.git/commitdiff
Testing create repo path.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 01:14:24 +0000 (20:14 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 01:14:24 +0000 (20:14 -0500)
src/controllers/git.controller.js

index 58de911bf8a257e38b8fac8b6af090aeb6c76930..1e3a7f4d7384d297bd4a882ef97fd6a33ddb9442 100755 (executable)
@@ -12,7 +12,7 @@ module.exports = {
 
     const conn = new Client();
     conn.on( 'ready', () => {
-      const commands = type === 'private' ? [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R u+rwX,go-rwx /opt/git/${ name }.git`,] : [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare --shared=group`, `chown -R git:git /opt/git/${ name }.git`, `chmod -R g+rwX /opt/git/${ name }.git`, `find /opt/git/${ name }.git -type d -exec chmod g+s {} \\;`, `git config core.sharedRepository group`,];
+      const commands = type === 'private' ? [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R u+rwX,go-rwx /opt/git/${ name }.git`,] : [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare --shared=group`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R g+rwX /opt/git/${ name }.git`, `find /opt/git/${ name }.git -type d -exec chmod g+s {} \\;`, `git config core.sharedRepository group`,];
       console.log( commands );
       console.log( [...commands].join( ' && ' ) );
       conn.exec( `sudo -u git bash -c "${ commands.join( ' && ' ) }"`, ( err, stream ) => {