Outils pour utilisateurs

Outils du site


tech:notes_gogs_forge_git_serveur_github_like

Ceci est une ancienne révision du document !


Notes GOGS forge git serveur github like

Voir aussi :

Voir :

wget https://dl.gogs.io/gogs_v0.9.141_linux_amd64.zip
unzip gogs_v0.9.141_linux_amd64.zip
 
cd gogs

Gogs ne fonctionne pas directement avec git-shell

fatal: Could not read from remote repository.
Please make sure you have the correct access rights
# Delete
passwd -d git
 
# Lock
passwd -l git
 
usermod -s /bin/bash git

/etc/ssh/sshd_config

AllowUsers plop git

Match User git
    PasswordAuthentication no
service ssh restart
apt-get install supervisor

/etc/supervisor/conf.d/gogs.conf

[program:gogs]
directory=/home/git/gogs/
command=/home/git/gogs/gogs web
autostart=true
autorestart=true
startsecs=10
stdout_logfile=/var/log/gogs/stdout.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/var/log/gogs/stderr.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
user = git
environment = HOME="/home/git", USER=git"

Pour faire fonctionner SMTP et avoir les notifications par mails :

/home/git/gogs/custom/conf/app.ini

[mailer]
SKIP_VERIFY = true

Sur poste client

Il est possible d'utiliser HTTP(S) ou SSH

Exemple de conf SSH pour utiliser un proxy d'entreprise

~/.ssh/config

Host git.acme.fr
    User git
    Hostname git.acme.fr
    Port 443
    ProxyCommand /usr/bin/corkscrew 192.168.56.1 3128 %h %p

Conf complète app.ini

/home/git/gogs/custom/conf/app.ini

APP_NAME = Gogs: Go Git Service
RUN_USER = git
RUN_MODE = prod
 
[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gogs
USER     = root
PASSWD   = 
SSL_MODE = disable
PATH     = data/gogs.db
 
[repository]
ROOT = /home/git/gogs-repositories
 
[server]
DOMAIN       = git.acme.fr
HTTP_PORT    = 3000
ROOT_URL     = https://git.acme.fr/
DISABLE_SSH  = false
SSH_PORT     = 443
OFFLINE_MODE = true
 
[mailer]
ENABLED = true
HOST    = localhost:25
FROM    = GOGS <git@acme.fr>
USER    = 
PASSWD  = 
SKIP_VERIFY = true
 
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL     = true
DISABLE_REGISTRATION   = true
ENABLE_CAPTCHA         = false
REQUIRE_SIGNIN_VIEW    = true
 
[picture]
DISABLE_GRAVATAR        = true
ENABLE_FEDERATED_AVATAR = false
 
[session]
PROVIDER = file
 
[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = /home/git/gogs/log
 
[security]
INSTALL_LOCK = true
SECRET_KEY   = JziSLMT87mxkURM
tech/notes_gogs_forge_git_serveur_github_like.1763061441.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki