User Tools


server:stagit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
server:stagit [2025/08/24 07:31] marlonivoserver:stagit [2025/08/24 07:36] (current) – [Cloning] marlonivo
Line 74: Line 74:
 </code> </code>
  
-Set the right permissions for the whole directory, ''%%www-data%%'' for nginx and ''%%git%%'' for git:+Set the right permissions for the complete directory, ''%%www-data%%'' for nginx and ''%%git%%'' for git:
 <code> <code>
 chown -R git:www-data /var/www/stagit  chown -R git:www-data /var/www/stagit 
Line 96: Line 96:
 </code> </code>
  
-Now inside your freshly generated bare git folder, change the project description, the owner name and the clone url as well as creating a git-daemon-export-ok in order to let anyone clone your repo.+Now inside your freshly generated bare git folder found in ''%%.git%%'', change the project description, the owner name and the clone url as well as creating a git-daemon-export-ok (leave empty) in order to let anyone clone your repo.
 <code> <code>
 /project1/.git/ /project1/.git/
Line 105: Line 105:
 </code> </code>
  
-As well as in your ''%%/hooks%%'' folder add a ''%%post-receive%%'' script to update all necessary files after git pushing to your server (change file destination and repo name accordingly) with the following content:+As well as in your ''%%.git/hooks%%'' folder add a ''%%post-receive%%'' script to update all necessary files after git pushing to your server (change file destination and repo name accordingly) with the following content:
 <code bash> <code bash>
 #!/bin/sh #!/bin/sh
Line 136: Line 136:
     git commit -m "$msg"     git commit -m "$msg"
     git push stagit master     git push stagit master
-#   git push aur master      <- add aur remote +#   git push aur master      <- if you own aur 
-#   git push github master   <- and github remote here+#   git push github master   <- and github remotes
 } }
 </code> </code>
Line 156: Line 156:
  
 [Service] [Service]
-ExecStart=/usr/bin/git daemon \+ExecStart=/usr/bin/git-daemon \
   --base-path=/var/www/stagit/repos \   --base-path=/var/www/stagit/repos \
   --export-all \   --export-all \
Line 176: Line 176:
 </code> </code>
  
-Then open port 9418 in your firewall:+Then open port 9418 in your firewall to let anyone clone your repo:
 <code> <code>
 sudo ufw allow 9418/tcp sudo ufw allow 9418/tcp