Host git repo on my VPS

I am trying to host в git repo on my VPS. However, I want to нравится the repo under the user home directory.

Example http://DOMAIN_NAME/~askubuntu/gitrepo.git

I have apache2 installed which allows я to монитор the user поля by accessing the above соединение.

I tried the following:

cd /home/askubuntu/public_html/
mkdir gitrepo.git
git --bare init

The above creates the directory gitrepo.git and adds поля and folders for git (branch / HEAD и т.д...)

My goal is to have several users клонировал my repo to their machines and contribute to it:

git clone askubuntu@DOMAIN_NAME:gitrepo.git
git push origin master

Right now if I try cloning the project it returns

fatal: 'gitrepo.git' does not appear to be a git repository

Any suggestions of what is missing, or any recommended tutorial/guide that you хан share

Thank you

0
задан 13 December 2015 в 01:26

1 ответ

Вы сделали репозиторий в ~/public_html/gitrepo.git. Так, при использовании Мерзавца по SSH путь был бы относителен корневой каталог:

git clone askubuntu@DOMAIN_NAME:public_html/gitrepo.git
1
ответ дан 26 July 2019 в 12:48

Другие вопросы по тегам:

Похожие вопросы: