Outils pour utilisateurs

Outils du site


tech:notes_gogs_forge_git_serveur_github_like

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_gogs_forge_git_serveur_github_like [2025/11/13 20:17] Jean-Baptistetech:notes_gogs_forge_git_serveur_github_like [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon git}}
 +
 +# Notes GOGS forge git serveur github like
 +
 +
 +Voir aussi : 
 +* https://gitea.io et Forgejo (fork de Gogs)
 +* Gitlab
 +
 +Voir : 
 +* https://gogs.io/
 +* [[https://fr.wikipedia.org/wiki/Gogs_(logiciel)]]
 +
 +
 +~~~bash
 +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
 +~~~
 +
 +~~~bash
 +# 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
 +~~~
 +
 +~~~bash
 +service ssh restart
 +~~~
 +
 +
 +
 +~~~bash
 +apt-get install supervisor
 +~~~
 +
 +
 +`/etc/supervisor/conf.d/gogs.conf`
 +~~~ini
 +[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`
 +~~~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`
 +~~~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
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki