github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/docker/git-ssh/git-shell-commands/no-interactive-login (about) 1 #!/bin/sh 2 3 PROGNAME="Git-SSH server" 4 PREPOS=/git/repos 5 PCLONEURL="ssh://git@<SERVER>:<PORT>/git/repos/<REPO_NAME>.git" 6 EXIT_CODE=128 7 8 printf '%s\n' "~~~ Welcome to ${PROGNAME}! ~~~" 9 printf '\n' 10 printf '%s\n' "$(git --version | tr 'git' 'Git')" 11 printf '\n' 12 printf '%s\n' "You have successfully authenticated but" 13 printf '%s\n' "interactive shell access is not provided." 14 printf '\n' 15 printf '%s\n' "The following Git repositories are available:" 16 17 for REPO in ${PREPOS}/*.git 18 do 19 printf '%s\n' " * $(basename ${REPO%.git})" 20 printf '%s\n' "\ 21 $(git --git-dir=${REPO} log --all -1 --pretty=format:"%h %s 22 --%an, %as")" 23 done 24 25 printf '\n' 26 printf '%s\n' "To clone, use the following URL:" 27 printf '%s\n' "${PCLONEURL}" 28 printf '\n' 29 printf '%s\n' "~~~ Bye! ~~~" 30 printf '\n' 31 32 exit ${EXIT_CODE}