cleaned up gitlab-shell
This commit is contained in:
parent
4b59ae35b6
commit
3cd8658a51
3 changed files with 0 additions and 264 deletions
|
@ -1,11 +1,7 @@
|
||||||
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
|
AUX gitlab-shell-3.2.0-config-paths.patch 1826 SHA256 c83db7c37dcac577ce499eab4bb0168253f49d303ba1991fdec90d13cc3fe37a SHA512 7524b6b8cd7cd141a56c468efa303b1d21576ac9e03cb866cbf9dcac34e1b8d4f356333737050e2e5dfeb0f0ad904b3f548c40e1209c1f35054ed2027b1d8271 WHIRLPOOL fdbd2dfe43ff4a2af97227fbf8c4589ca3734ebf0320b7e9c5e8ea39882c49d45815a0ee3c765a141affacbe48f4063987b9664a918e0e216b49ca46a475cc5f
|
||||||
AUX gitlab-shell-4.1.1-config-paths.patch 2152 SHA256 e789f0c8a8b7ec8a840ce26dd63d6e5386a149f619d7ad5a6788577d897c4826 SHA512 6ae5af0c364061af4c9675804e2f6d6b662ed4891ed4c80bc1be39e9da6343db372e58bf04a0d3c8a4fc218daeb8cda45636e0da0c67ec801168e84004d05b86 WHIRLPOOL b8136b81ef943c15feeca303d1d7f0d55c85ff7f7ec82bfceea026ce334ca24fce0dfb599946562bd0aceb89a2216bcfaa894235c43f41e3031a305f85e756b4
|
AUX gitlab-shell-4.1.1-config-paths.patch 2152 SHA256 e789f0c8a8b7ec8a840ce26dd63d6e5386a149f619d7ad5a6788577d897c4826 SHA512 6ae5af0c364061af4c9675804e2f6d6b662ed4891ed4c80bc1be39e9da6343db372e58bf04a0d3c8a4fc218daeb8cda45636e0da0c67ec801168e84004d05b86 WHIRLPOOL b8136b81ef943c15feeca303d1d7f0d55c85ff7f7ec82bfceea026ce334ca24fce0dfb599946562bd0aceb89a2216bcfaa894235c43f41e3031a305f85e756b4
|
||||||
DIST gitlab-shell-3.6.6.tar.gz 77199 SHA256 db3f54b561bb81059256c634967b181707e11cc25e30b0fa76eb034718d0eaf9 SHA512 d1d15687169f7b151caf3b371d6570099129a2a69d7732e6be7337f70aaef7e36c87e8aa5140e9697c7be36185743bb939d862790b440fc18d7a864d570fcb6b WHIRLPOOL 4161901369cc12a89fb89c41bd98cfc2cfdeb5aac6d317597ae11f10bcd401e4c18148ce9a20f5e967a6fb11559f33aa72c82dff1a52764c5a19bcd0f06250c1
|
|
||||||
DIST gitlab-shell-4.0.0.tar.gz 76582 SHA256 2d8d5e31eac5007a70720465d71c6cee74428a71c2fda7e21ca8393bc8c8966f SHA512 dd44528dc2914025e850b7172df1c5e0b39f8c1764adeea62a824643723c3264c462006ddf0cc6f4519d0caf0c39e6cee601f9f7988eb54138118176178045e4 WHIRLPOOL 462886da23a1723049914759f0b315d39c42488e55dfab4debae57c7b20878a421dac36a77d5e82603119e4eb142c83dbf18e28213670abd81396de1d0c683cf
|
|
||||||
DIST gitlab-shell-4.0.3.tar.gz 76721 SHA256 66f9a3572e6cd06632a267a5248c4878bf48ff62f5360b3108f42100b3ffd361 SHA512 b45027141557403a9e7818dec93b3e790a38887c22f3a2d0f298f1238e51ce4d96f603b2b225433275afd601e7544a611b98ec6711b0ed95228f321fe4b8d898 WHIRLPOOL 836e7476c874cfede14b66ee445cfac08db2cf22f2803fc0def8a20924e2578b441d605d85a923f2951bd5a6a9d11e79f1a15762bd401b8111e61fbe1d28b56e
|
DIST gitlab-shell-4.0.3.tar.gz 76721 SHA256 66f9a3572e6cd06632a267a5248c4878bf48ff62f5360b3108f42100b3ffd361 SHA512 b45027141557403a9e7818dec93b3e790a38887c22f3a2d0f298f1238e51ce4d96f603b2b225433275afd601e7544a611b98ec6711b0ed95228f321fe4b8d898 WHIRLPOOL 836e7476c874cfede14b66ee445cfac08db2cf22f2803fc0def8a20924e2578b441d605d85a923f2951bd5a6a9d11e79f1a15762bd401b8111e61fbe1d28b56e
|
||||||
DIST gitlab-shell-4.1.1.tar.gz 78829 SHA256 61f684b4528b0b789aad80efbfd8f9870d113f6e2794e589e0db9e74e6737e1d SHA512 17b929da1c6148a9af2787ca4a18081e3108622a40c6fb3f02f36f4ba41f2a1d61cf83509ace849093334af8f4ad74d8a36393bf9fca7ab21163d2f48b499879 WHIRLPOOL cfd258e93abeae4a33c1578114d56186c81a7c5894a3ccb9b690dd9a78051746916f3bac2b7146b8378534d5e177ba4cacb4c2011b64011328b056d4d397967e
|
DIST gitlab-shell-4.1.1.tar.gz 78829 SHA256 61f684b4528b0b789aad80efbfd8f9870d113f6e2794e589e0db9e74e6737e1d SHA512 17b929da1c6148a9af2787ca4a18081e3108622a40c6fb3f02f36f4ba41f2a1d61cf83509ace849093334af8f4ad74d8a36393bf9fca7ab21163d2f48b499879 WHIRLPOOL cfd258e93abeae4a33c1578114d56186c81a7c5894a3ccb9b690dd9a78051746916f3bac2b7146b8378534d5e177ba4cacb4c2011b64011328b056d4d397967e
|
||||||
EBUILD gitlab-shell-3.6.6.ebuild 3653 SHA256 49c383d1d5895069a6783e44d492935879801efd95f57548a81e10df48339038 SHA512 4e6dd5c34a56ed0e1fc45819c93239c61d900304cc8df20855f4e71e4fab234b5e81612f256155022f362f4f9a0959531a3999eb7ece9013914129e4343795cf WHIRLPOOL 92d40a6cb8dd19a42093a746e29ead878eeb9b0c741e23ca3e6213c0a14b820584633db8f2d5ac60cd28da15546232de417db72ccdf8608bc49ac333107f7193
|
|
||||||
EBUILD gitlab-shell-4.0.0.ebuild 3653 SHA256 1413668c9a75cc89b4043e497b9339639bcfce942486d8dada512968c53633b9 SHA512 0f825e5812084601b56f790d880da266986717cd2a35a4033cb75710b3cae624fe5015412a0674dab3c2099eaf29a956af19ffcc6d671bcddf72dfb8507f47e1 WHIRLPOOL dff4dc61e0f568767e25e865546a57018f82b2f28c5bc974df263021d19c0cf194a269b21b8422878e09cb3fd8c7cb34600e005c49dacde0c56df1701bb5e64c
|
|
||||||
EBUILD gitlab-shell-4.0.3.ebuild 3653 SHA256 4c47b55bc61c0d86499f2b7ab3a94ae1b5b6886faf9035f2a98094ebf7701aea SHA512 7de7b0c8b164d50de2cac220f66fe5a9a51809db8e565e74d27449ac2629c566b0d5d90b3d6f9dd0a2bf609526ec4cc62744d2c80d27b302d5719ec28f3485c3 WHIRLPOOL 79ea419a1107ea54aa0937cee7043e7691799ead6dabea69bb11ea57af0403102e5e7ab4de844f2358449578dd583d433eebfc567f88c1e2110e7fe1731ca47b
|
EBUILD gitlab-shell-4.0.3.ebuild 3653 SHA256 4c47b55bc61c0d86499f2b7ab3a94ae1b5b6886faf9035f2a98094ebf7701aea SHA512 7de7b0c8b164d50de2cac220f66fe5a9a51809db8e565e74d27449ac2629c566b0d5d90b3d6f9dd0a2bf609526ec4cc62744d2c80d27b302d5719ec28f3485c3 WHIRLPOOL 79ea419a1107ea54aa0937cee7043e7691799ead6dabea69bb11ea57af0403102e5e7ab4de844f2358449578dd583d433eebfc567f88c1e2110e7fe1731ca47b
|
||||||
EBUILD gitlab-shell-4.1.1.ebuild 3653 SHA256 06702f4658b8ac1bada6b322b833f65270656730417d8c9bb000ab1fb23af8f0 SHA512 dc63160d98dabfcbaa9982fe841fd581a1b1b2a968e7c7bd1ee336e449214fa89da33477f0d4744941ee3ecb8688386883a5923e78025bdcfd1556e68ea7371c WHIRLPOOL cd59e133d1d02f082f10312b358c6c8718898aa008a967fc85934656500ceefc44a6affae286123c481aa902fa51cdb7e7f98788057fdd08304ed99f643ef27c
|
EBUILD gitlab-shell-4.1.1.ebuild 3653 SHA256 06702f4658b8ac1bada6b322b833f65270656730417d8c9bb000ab1fb23af8f0 SHA512 dc63160d98dabfcbaa9982fe841fd581a1b1b2a968e7c7bd1ee336e449214fa89da33477f0d4744941ee3ecb8688386883a5923e78025bdcfd1556e68ea7371c WHIRLPOOL cd59e133d1d02f082f10312b358c6c8718898aa008a967fc85934656500ceefc44a6affae286123c481aa902fa51cdb7e7f98788057fdd08304ed99f643ef27c
|
||||||
MISC ChangeLog 2576 SHA256 bdf6d8055e11a9d46fa77cd325fca046028cc50e6c5cfdb2350ad4aa5190370a SHA512 e88f5072f982524104ebef77c018946d1f37a1f0bb572c29e9bb529de4a774a6ceba1844a0b5d40a130f4c29b8dae177387f8bbf7b28c2736ee621a7fec8cdcc WHIRLPOOL f4852d792d410e59b97bcc65e14575f1ca77f562eba89dde926375efb8d5660c27e0ab4d2336f33bf898b2c468b6b6b82b9168e36bb96305107d17ebf2464efc
|
MISC ChangeLog 2576 SHA256 bdf6d8055e11a9d46fa77cd325fca046028cc50e6c5cfdb2350ad4aa5190370a SHA512 e88f5072f982524104ebef77c018946d1f37a1f0bb572c29e9bb529de4a774a6ceba1844a0b5d40a130f4c29b8dae177387f8bbf7b28c2736ee621a7fec8cdcc WHIRLPOOL f4852d792d410e59b97bcc65e14575f1ca77f562eba89dde926375efb8d5660c27e0ab4d2336f33bf898b2c468b6b6b82b9168e36bb96305107d17ebf2464efc
|
||||||
|
|
|
@ -1,130 +0,0 @@
|
||||||
# Copyright 1999-2016 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
USE_RUBY="ruby21 ruby23"
|
|
||||||
|
|
||||||
inherit eutils ruby-ng user
|
|
||||||
|
|
||||||
MY_PV="v${PV/_/-}"
|
|
||||||
MY_GIT_COMMIT="0cc6cfc11be21597b11470c1c1aaa7e4a92618db"
|
|
||||||
|
|
||||||
DESCRIPTION="SSH access and repository management for GitLab"
|
|
||||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
|
||||||
SRC_URI="https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
|
|
||||||
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND="
|
|
||||||
>=dev-vcs/git-2.7.4
|
|
||||||
dev-db/redis
|
|
||||||
virtual/ssh"
|
|
||||||
ruby_add_bdepend "
|
|
||||||
virtual/ruby-ssl"
|
|
||||||
|
|
||||||
MERGE_TYPE="binary"
|
|
||||||
|
|
||||||
RUBY_PATCHES=(
|
|
||||||
"${PN}-3.2.0-config-paths.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
GIT_USER="git"
|
|
||||||
DEST_DIR="/usr/share/${PN}"
|
|
||||||
DATA_DIR="/var/lib/git"
|
|
||||||
LOGS_DIR="/var/log/gitlab"
|
|
||||||
CONF_FILE="/etc/gitlab-shell.yml"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup ${GIT_USER}
|
|
||||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
|
||||||
|
|
||||||
local git_shell=$(egetshell ${GIT_USER})
|
|
||||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
|
||||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
|
||||||
ewarn "Changing shell to /bin/bash ..."
|
|
||||||
|
|
||||||
usermod -s /bin/bash ${GIT_USER} \
|
|
||||||
|| die "failed to change login shell for ${GIT_USER}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_prepare() {
|
|
||||||
# fix paths
|
|
||||||
sed -i -E \
|
|
||||||
-e "s|/home/git|${DATA_DIR}|" \
|
|
||||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
|
||||||
config.yml.example || die "failed to filter config.yml.example"
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
|
||||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_install() {
|
|
||||||
# install lib
|
|
||||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
|
||||||
|
|
||||||
# install scripts
|
|
||||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
|
||||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
|
||||||
exeinto ${DEST_DIR}/support; doexe support/*
|
|
||||||
|
|
||||||
# create symlinks to bin
|
|
||||||
local name; for name in $(basename -a bin/gitlab-*); do
|
|
||||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
|
||||||
done
|
|
||||||
|
|
||||||
insinto $(dirname ${CONF_FILE})
|
|
||||||
newins config.yml.example $(basename ${CONF_FILE})
|
|
||||||
|
|
||||||
# create symlink for .gitlab_shell_secret
|
|
||||||
einfo "creating symlink for .gitlab_shell_secret"
|
|
||||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
|
||||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
|
||||||
|
|
||||||
# prepare directories
|
|
||||||
diropts -m750; dodir ${DATA_DIR}
|
|
||||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
|
||||||
diropts -m755; dodir ${LOGS_DIR}
|
|
||||||
|
|
||||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
|
||||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
|
||||||
|
|
||||||
# fix permissions
|
|
||||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# check git home directory
|
|
||||||
local git_home=$(egethome ${GIT_USER})
|
|
||||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
|
||||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
|
||||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
|
||||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
|
||||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
|
||||||
ewarn "and move ${git_home}/.ssh here."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
|
|
||||||
local auth_dir="${git_home}/.ssh"
|
|
||||||
|
|
||||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
|
||||||
mkdir -p ${auth_dir}
|
|
||||||
touch ${auth_dir}/authorized_keys
|
|
||||||
chmod -R u=rwX,go=- ${auth_dir}
|
|
||||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
|
||||||
|
|
||||||
elog
|
|
||||||
elog "GitLab Shell was initialized. Repositories are located in"
|
|
||||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
|
||||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
|
||||||
elog
|
|
||||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
|
||||||
}
|
|
|
@ -1,130 +0,0 @@
|
||||||
# Copyright 1999-2016 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
EAPI="5"
|
|
||||||
|
|
||||||
USE_RUBY="ruby21 ruby23"
|
|
||||||
|
|
||||||
inherit eutils ruby-ng user
|
|
||||||
|
|
||||||
MY_PV="v${PV/_/-}"
|
|
||||||
MY_GIT_COMMIT="ed59fbc3b72146cd9c4e040c64150c8b961c7d42"
|
|
||||||
|
|
||||||
DESCRIPTION="SSH access and repository management for GitLab"
|
|
||||||
HOMEPAGE="https://gitlab.com/gitlab-org/gitlab-shell"
|
|
||||||
SRC_URI="https://gitlab.com/gitlab-org/gitlab-shell/repository/archive.tar.gz?ref=${MY_PV} -> ${P}.tar.gz"
|
|
||||||
RUBY_S="${PN}-${MY_PV}-${MY_GIT_COMMIT}"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm ~arm64"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
DEPEND=""
|
|
||||||
RDEPEND="
|
|
||||||
>=dev-vcs/git-2.7.4
|
|
||||||
dev-db/redis
|
|
||||||
virtual/ssh"
|
|
||||||
ruby_add_bdepend "
|
|
||||||
virtual/ruby-ssl"
|
|
||||||
|
|
||||||
MERGE_TYPE="binary"
|
|
||||||
|
|
||||||
RUBY_PATCHES=(
|
|
||||||
"${PN}-3.2.0-config-paths.patch"
|
|
||||||
)
|
|
||||||
|
|
||||||
GIT_USER="git"
|
|
||||||
DEST_DIR="/usr/share/${PN}"
|
|
||||||
DATA_DIR="/var/lib/git"
|
|
||||||
LOGS_DIR="/var/log/gitlab"
|
|
||||||
CONF_FILE="/etc/gitlab-shell.yml"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
enewgroup ${GIT_USER}
|
|
||||||
enewuser ${GIT_USER} -1 /bin/bash ${DATA_DIR} "${GIT_USER}"
|
|
||||||
|
|
||||||
local git_shell=$(egetshell ${GIT_USER})
|
|
||||||
if [ ! ${git_shell} -ef '/bin/bash' ]; then
|
|
||||||
ewarn "User ${GIT_USER} already exists, but with the shell ${git_shell}."
|
|
||||||
ewarn "Changing shell to /bin/bash ..."
|
|
||||||
|
|
||||||
usermod -s /bin/bash ${GIT_USER} \
|
|
||||||
|| die "failed to change login shell for ${GIT_USER}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_prepare() {
|
|
||||||
# fix paths
|
|
||||||
sed -i -E \
|
|
||||||
-e "s|/home/git|${DATA_DIR}|" \
|
|
||||||
-e "s|[\# ]*(log_file: ).*|\1\"${LOGS_DIR}/gitlab-shell.log\"|" \
|
|
||||||
config.yml.example || die "failed to filter config.yml.example"
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e "s|File\.join(ROOT_PATH, 'config.yml')|'${CONF_FILE}'|" \
|
|
||||||
lib/gitlab_config.rb || die "failed to filter gitlab_config.rb"
|
|
||||||
}
|
|
||||||
|
|
||||||
all_ruby_install() {
|
|
||||||
# install lib
|
|
||||||
insinto ${DEST_DIR}; doins -r lib LICENSE README.md VERSION
|
|
||||||
|
|
||||||
# install scripts
|
|
||||||
exeinto ${DEST_DIR}/bin; doexe bin/*
|
|
||||||
exeinto ${DEST_DIR}/hooks; doexe hooks/*
|
|
||||||
exeinto ${DEST_DIR}/support; doexe support/*
|
|
||||||
|
|
||||||
# create symlinks to bin
|
|
||||||
local name; for name in $(basename -a bin/gitlab-*); do
|
|
||||||
dosym "${DEST_DIR}/bin/${name}" "/usr/bin/${name}"
|
|
||||||
done
|
|
||||||
|
|
||||||
insinto $(dirname ${CONF_FILE})
|
|
||||||
newins config.yml.example $(basename ${CONF_FILE})
|
|
||||||
|
|
||||||
# create symlink for .gitlab_shell_secret
|
|
||||||
einfo "creating symlink for .gitlab_shell_secret"
|
|
||||||
TOKEN_FILE="${DEST_DIR}/.gitlab_shell_secret"
|
|
||||||
dosym /opt/gitlab/.gitlab_shell_secret "$TOKEN_FILE"
|
|
||||||
|
|
||||||
# prepare directories
|
|
||||||
diropts -m750; dodir ${DATA_DIR}
|
|
||||||
diropts -m770; keepdir ${DATA_DIR}/repositories
|
|
||||||
diropts -m755; dodir ${LOGS_DIR}
|
|
||||||
|
|
||||||
# GitLab stupidly expects that gitlab-shell is in home of git user...
|
|
||||||
dosym ${DEST_DIR} ${DATA_DIR}/gitlab-shell
|
|
||||||
|
|
||||||
# fix permissions
|
|
||||||
fowners -R ${GIT_USER}:${GIT_USER} ${DATA_DIR} ${LOGS_DIR}
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# check git home directory
|
|
||||||
local git_home=$(egethome ${GIT_USER})
|
|
||||||
if [ ! "${git_home}" -ef ${DATA_DIR} ]; then
|
|
||||||
ewarn "An authorized_keys is configured to be inside ${DATA_DIR}/.ssh,"
|
|
||||||
ewarn "but HOME of ${GIT_USER} user is located in ${git_home}. You must"
|
|
||||||
ewarn "either change the authorized_keys location in ${CONF_FILE},"
|
|
||||||
ewarn "or change home directory of ${GIT_USER} user to ${DATA_DIR}"
|
|
||||||
ewarn "and move ${git_home}/.ssh here."
|
|
||||||
ewarn
|
|
||||||
fi
|
|
||||||
|
|
||||||
local auth_dir="${git_home}/.ssh"
|
|
||||||
|
|
||||||
elog "Initializing authorized_keys file in ${auth_dir}"
|
|
||||||
mkdir -p ${auth_dir}
|
|
||||||
touch ${auth_dir}/authorized_keys
|
|
||||||
chmod -R u=rwX,go=- ${auth_dir}
|
|
||||||
chown -R ${GIT_USER}:${GIT_USER} ${auth_dir}
|
|
||||||
|
|
||||||
elog
|
|
||||||
elog "GitLab Shell was initialized. Repositories are located in"
|
|
||||||
elog "${DATA_DIR}/repositories, scripts in ${DEST_DIR}/bin."
|
|
||||||
elog "All gitlab-* scripts was symlinked to /usr/bin to be on your path."
|
|
||||||
elog
|
|
||||||
elog "You should change your gitlab_url in: ${CONF_FILE}."
|
|
||||||
}
|
|
Loading…
Reference in a new issue