Last active
January 29, 2025 04:41
-
-
Save Mic92/7b59c4b9616d19e8efdf to your computer and use it in GitHub Desktop.
Anonymous ssh access for gitolite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# save as /usr/local/bin/gitolite-anongit | |
# and chmod +x /usr/local/bin/gitolite-anongit | |
# ForceCommand may depend on the gitolite distribution | |
/usr/share/gitolite/gl-auth-command anongit "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/passwd | |
git:x:999:999:git daemon user:/:/bin/bash | |
# copy the git user line so anongit gets the same numerical user and group id | |
anongit:x:999:999:git daemon user:/:/usr/local/bin/gitolite-anongit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/shadow | |
# empty password for anongit | |
anongit:$6$CzyksOHg$XLEU.cggUG9QjGkrPb3EdtyrWHcEwFJCNLP1eldVCOVEhZgg5MYJrIL0gS3.2Xarw/8GgzyICNVjh0ibUIR0j0:16373:0:99999:7::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/ssh/sshd_config | |
Match User anongit | |
X11Forwarding no | |
AllowTcpForwarding no | |
PermitEmptyPasswords yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment