From: charleswrayjr Date: Sat, 6 Sep 2025 01:14:24 +0000 (-0500) Subject: Testing create repo path. X-Git-Url: https://git.phasecustomsoft.com/static/%7B?a=commitdiff_plain;h=2f99caeb84474ed0abce8a98362f7f08ec98f3fc;p=phs-api.git Testing create repo path. --- diff --git a/src/controllers/git.controller.js b/src/controllers/git.controller.js index 58de911..1e3a7f4 100755 --- a/src/controllers/git.controller.js +++ b/src/controllers/git.controller.js @@ -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 ) => {