diff --git a/add_mirror.sh b/add_mirror.sh index d04a28429d732830450064129bea9c2bc48670b5..1283ea951c0489aae41eadf7d994594f8eacadda 100755 --- a/add_mirror.sh +++ b/add_mirror.sh @@ -193,7 +193,7 @@ if ${git};then echo "Creating mirror from ${mirror}" cd "${repo_dir}/${gitlab_namespace}" git clone --mirror ${mirror} "${project_name}" - cd "$1" + cd "${project_name}" #add the gitlab remote echo "Adding gitlab remote to project." git remote add gitlab ${gitlab_remote} diff --git a/config.sh.SAMPLE b/config.sh.SAMPLE index 36c20582580fbe1477982fb5ecac37e5b289fa22..e132809a7bc8f46c8d8f544f893eeb63f69d877b 100644 --- a/config.sh.SAMPLE +++ b/config.sh.SAMPLE @@ -6,8 +6,12 @@ #The user git-mirrors will run as. system_user="gitmirror" +#The home directory path of the $system_user user_home="/home/${system_user}" +#The repository directory where gitlab-mirrors will copies of mirrored repositories before pushing them to gitlab. repo_dir="${user_home}/repositories" +#colorize output of add_mirror.sh, update_mirror.sh, and git-mirrors.sh commands. +enable_colors=true # # Gitlab settings @@ -21,3 +25,14 @@ gitlab_url="https://gitlab.example.com" gitlab_user="gitmirror" #Generate a token for your $gitlab_user and set it here. gitlab_user_token_secret="$(head -n1 "${user_home}/private_token")" + +# +# Gitlab new project default settings. If a project needs to be created by gitlab-mirrors +# then it will assign the following values as defaults. +# + +issues_enabled=false +wall_enabled=false +wiki_enabled=false +snippets_enabled=false +public=false