31 lines
1 KiB
Markdown
31 lines
1 KiB
Markdown
Порезанная версия сервиса gitrepo
|
||
|
||
## Установка
|
||
|
||
1. Ставим на серваке Docker (https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
|
||
2. Копируем все файлы на сервер
|
||
3. Редактируем файл .env под себя и указываем правильный домен в файле etc/Caddyfile
|
||
3. Выполняем в директории с файлами команду
|
||
```
|
||
docker compose up -d
|
||
```
|
||
4. Настраиваем SSH:
|
||
```
|
||
adduser \
|
||
--system \
|
||
--shell /bin/bash \
|
||
--gecos 'Git Version Control' \
|
||
--group \
|
||
--disabled-password \
|
||
--home /home/git \
|
||
git
|
||
```
|
||
5. Добавляем в /etc/ssh/sshd_config
|
||
```
|
||
Match User git
|
||
AuthorizedKeysCommandUser git
|
||
AuthorizedKeysCommand /usr/bin/docker exec -i git /usr/local/bin/forgejo keys -e git -u %u -t %t -k %k
|
||
PasswordAuthentication no
|
||
```
|
||
## Если не завелось
|
||
1. Смотрим статус сервисов - |