Create .ssh/autherized_keys as gitlab user

This commit is contained in:
Pirate Praveen 2018-10-13 21:23:13 +05:30
parent 703dbc9023
commit 973d502ef1

View file

@ -93,9 +93,8 @@ case "$1" in
# Create directories and change ownership
echo "Creating runtime directories for gitlab..."
# Setup ssh key file
mkdir -p ${gitlab_data_dir}/.ssh
touch ${gitlab_data_dir}/.ssh/authorized_keys
chown -R ${gitlab_user}: ${gitlab_data_dir}/.ssh
runuser -u ${gitlab_user} -- sh -c "mkdir -p ${gitlab_data_dir}/.ssh"
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/.ssh/authorized_keys"
# Create .bundle for .bundle/config
mkdir -p ${gitlab_data_dir}/.bundle
chown -R ${gitlab_user}: ${gitlab_data_dir}/.bundle