Skip to content

Commit 243e08b

Browse files
committed
Fix broken git login
1 parent 80cc706 commit 243e08b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ RUN apk add --no-cache openssh git
77
# -D flag avoids password generation
88
# -s flag changes user's shell
99
RUN adduser -D -s /usr/bin/git-shell git \
10+
&& passwd -u git \
1011
&& mkdir -p /git-server/keys /git-server/repos ~git/.ssh
1112

1213
# This is a login shell for SSH accounts to provide restricted Git access.

sshd_config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PermitRootLogin no
33
PasswordAuthentication no
44
AllowUsers git
55

6-
Match User git
7-
X11Forwarding no
8-
AllowTcpForwarding no
9-
ForceCommand git-shell
6+
# other security measures
7+
X11Forwarding no
8+
AllowTcpForwarding no
9+
PermitTTY no

0 commit comments

Comments
 (0)