Replace readme with markdown format

This commit is contained in:
Enrique Barcelli 2022-08-13 15:21:35 +08:00
parent b9c6aa7809
commit 4888319153
2 changed files with 61 additions and 69 deletions

61
readme.md Normal file
View file

@ -0,0 +1,61 @@
# USER'S QUICK REFERENCE
*************************************************
*IMPORTANT:*
* *THIS SERVER DOES NOT SUPPORT GIT-LFS*
* *YOU MAY ACCESS THIS SERVER VIA SSH OR HTTPS*
*************************************************
## 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 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 repote add origin https://git.barcelli.net/git/myrepo.git` (if you want to use https)
# 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)
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
## CREATE A NEW REPOSITORY (on the server by the administrator)
You may use either of the following:
1. 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
```
2. Run the following script as sudo:
`sudo ./create_repo.sh myrepo`
# REFERENCES
https://git-scm.com/ Git official documentation
https://learn.smt-acc.com/ Free introductory course to Git with certification

View file

@ -1,69 +0,0 @@
USER'S QUICK REFERENCE
----------------------
*************************************************
*IMPORTANT: THIS SERVER DOES NOT SUPPORT GIT-LFS*
*************************************************
*********************************************
*YOU MAY ACCESS THIS SERVER VIA SSH OR HTTPS*
*********************************************
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 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 repote add origin https://git.barcelli.net/git/myrepo.git #if you want to use https.
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
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
CREATE A NEW REPOSITORY (on the server by the administrator)
------------------------------------------------------------
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
Alternatively you may run the following script as sudo:
sudo ./create_repo.sh myrepo
REFERENCES
----------
https://git-scm.com/ #git official documentation
https://learn.smt-acc.com/ #free introductory course to Git with certification