diff --git a/debian/changelog b/debian/changelog index dbe846a901..00addc4045 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gitlab (8.9.0+dfsg-6) UNRELEASED; urgency=medium + + * Create .ssh/authorized_keys in postinst + + -- Pirate Praveen Wed, 20 Jul 2016 23:08:55 +0530 + gitlab (8.9.0+dfsg-5) unstable; urgency=medium * Tighten dependencies diff --git a/debian/postinst b/debian/postinst index e992c4ff6e..34f1966844 100755 --- a/debian/postinst +++ b/debian/postinst @@ -53,13 +53,17 @@ case "$1" in # Create directories and change ownership echo "Creating runtime directories for gitlab..." + # Setup ssh key file + mkdir ${gitlab_data_dir}/.ssh + touch ${gitlab_data_dir}/.ssh/authorized_keys + chown -R ${gitlab_user}: ${gitlab_data_dir}/.ssh + # Create more required directories for i in ${gitlab_repo_path} ${gitlab_cache_path} ${gitlab_uploads_path}\ ${gitlab_pid_path} ${gitlab_log_dir} ${gitlab_shell_log} ${gitlab_builds_log}; do mkdir -p $i chown -R ${gitlab_user}: $i done - # nginx/httpd should be able to connect to gitlab-workhorse.socket and serve public chown ${gitlab_user}:${nginx_user} -R ${gitlab_uploads_path}/.. ${gitlab_pid_path}