Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Robin Thoni 415e97ad70 fixed volume for avatars il y a 5 ans
gogs modified to "share" ssh host port il y a 6 ans
postgresql init il y a 6 ans
.gitignore init il y a 6 ans
README.md README.md il y a 5 ans
docker-compose.yml fixed volume for avatars il y a 5 ans
env modified to "share" ssh host port il y a 6 ans

README.md

Configure real git user

!!DO NOT USE BUILT-IN SSH SERVER!!

app.ini:

[server]
DISABLE_SSH      = false
SSH_PORT         = 22
START_SSH_SERVER = false

Create user and SSH key:

. ./env
groupadd -g "${PUID}" git
useradd -g git -u "${PGID}" git -d "$(pwd)"/data/gogs/git
sudo -u git ssh-keygen -f ~git/.ssh/id_rsa -N ''
echo -n 'no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ' | sudo -u git cat - ~git/.ssh/id_rsa.pub | sudo -u git tee ~git/.ssh/authorized_real_keys

/app/gogs/gogs: (chmod +x)

#!/bin/sh
ssh -p 35021 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"

/etc/ssh/sshd_config:

Match user git
  PasswordAuthentication no