From 775c0b2e7b866316fe2c7758f848a365d89b54f2 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Fri, 12 Aug 2022 09:06:52 +0800 Subject: [PATCH] Add reference to crea_repo script and free training course to the readme.txt file --- readme.txt | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/readme.txt b/readme.txt index 6208c0b..6ec61af 100644 --- a/readme.txt +++ b/readme.txt @@ -12,18 +12,18 @@ USER'S QUICK REFERENCE CLONE A REPO (onto the user local PC) ------------------------------------- -git clone git@git.barcelli.net:myrepo #You will need ssh authentication to clone and push. + git clone git@git.barcelli.net:myrepo #You will need ssh authentication to clone and push. -git clone https://git.barcelli.net/git/myrepo #You won't need authentication to clone with https, - #but you will need it to push to the repo. + git clone https://git.barcelli.net/git/myrepo #You won't need authentication to clone with https, + #but you will need it to push to the repo. ADD A REPO AS REMOTE (to a local repo on the user PC) ----------------------------------------------------- -git remote add origin git@git.barcelli.net:myrepo.git #If you want to use ssh. + git remote add origin git@git.barcelli.net:myrepo.git #If you want to use ssh. -git repote add origin https://git.barcelli.net/git/myrepo.git #if you want to use https. + git repote add origin https://git.barcelli.net/git/myrepo.git #if you want to use https. @@ -33,29 +33,37 @@ ADMINISTRATOR'S QUICK REFERENCE PROVIDE ACCESS (Users will have access to all repositories in the server) ------------------------------------------------------------------------- -1. Add the user's ssh public key to server #for ssh access + 1. Add the user's ssh public key to server #for ssh access -2. sudo htpasswd -m /etc/apache2/git.passwd user1 #for https access + 2. sudo htpasswd -m /etc/apache2/git.passwd user1 #for https access -3. No need to add any credentials for read-only access via https + 3. No need to add any credentials for read-only access via https CREATE A NEW REPOSITORY (on the server by the administrator) ------------------------------------------------------------ -cd /home/git -sudo mkdir myrepo.git -sudo chown -R git:www-data myrepo.git -sudo chmod g+s myrepo.git -cd myrepo.git -sudo git init --bare -cd .. -sudo chown -R git:www-data myrepo.git -sudo chmod -R 775 myrepo.git + Run the following commands: + + cd /home/git + sudo mkdir myrepo.git + sudo chown -R git:www-data myrepo.git + sudo chmod g+s myrepo.git + cd myrepo.git + sudo git init --bare + cd .. + sudo chown -R git:www-data myrepo.git + sudo chmod -R 775 myrepo.git + + Alternative you may run the following script as sudo: + + sudo ./crea_repo.sh myrepo REFERENCES ---------- -https://git-scm.com/ #git official documentation + https://git-scm.com/ #git official documentation + https://learn.smt-acc.com/ #free introductory course to Git with certification +