소스 검색

fix(gitzones): unlock git user to allow ssh-login using pubkey

Nils Wisiol 4 년 전
부모
커밋
beaa4fd31c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      gitzones/Dockerfile

+ 2 - 1
gitzones/Dockerfile

@@ -4,7 +4,8 @@ RUN apk add --no-cache openssh git python3
 
 RUN adduser -D -s /usr/bin/git-shell git \
   && mkdir /home/git/.ssh \
-  && ln -s /etc/ssh/keys/git_authorized_keys /home/git/.ssh/authorized_keys
+  && ln -s /etc/ssh/keys/git_authorized_keys /home/git/.ssh/authorized_keys \
+  && passwd -u git  # sshd config prohibits passwordless login
 
 COPY git-shell-commands /home/git/
 COPY sshd_config /etc/ssh/