diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 11dcf1c0a278a344beb873b409ff484eaad8de50..c4d6bcaab6dd9ccfc40c1ff95f9e2f142cd3d336 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,8 @@
 generate ci jobs:
-  variables:
-    git_strategy: clone
   script:
     - "./bin/generate-gitlab-ci-yml.sh"
   tags:
-    - "spack-k8s"
-  image: "scottwittenburg/spack_ci_generator_alpine"
+    - "spack-pre-ci"
   artifacts:
     paths:
       - ci-generation
diff --git a/bin/generate-gitlab-ci-yml.sh b/bin/generate-gitlab-ci-yml.sh
index b414d6c404e52a9207bb571419f23db21017a75d..bb59199cf2bed73ffce85a181f6f7b1c247ee3fc 100755
--- a/bin/generate-gitlab-ci-yml.sh
+++ b/bin/generate-gitlab-ci-yml.sh
@@ -67,33 +67,25 @@ if [[ $? -ne 0 ]]; then
     exit 1
 fi
 
+cd "$original_directory"
+mv .git "$temp_dir/original-git-dir"
+git init .
+
+git config user.email "robot@spack.io"
+git config user.name "Spack Build Bot"
+
 cp ${gen_ci_file} "${original_directory}/.gitlab-ci.yml"
+git add .
 
-# Remove global from here, it's clobbering people git identity config
-git config --global user.email "robot@spack.io"
-git config --global user.name "Build Robot"
-
-commit_msg="Auto-generated commit testing ${current_branch} (${CI_COMMIT_SHA})"
-
-cd ${original_directory}
-echo "git status"
-git status
-echo "git branch"
-git branch -D ___multi_ci___ 2> /dev/null || true
-echo "git checkout"
-git checkout -b ___multi_ci___
-echo "git add"
-git add .gitlab-ci.yml
 echo "git commit"
-git commit -m "$commit_msg"
-echo "git commit-tree/reset"
-# Prepare to send the whole working copy.  Doing this instead should be faster
-# until we decide to come up with a way of automatically keeping the downstream
-# repo in sync with the main one, at which point just pushing a single, new
-# commit with the change would be faster.
-git reset "$( git commit-tree HEAD^{tree} -m ${commit_msg} )"
-echo "git status"
-git status
+commit_message="Auto-generated commit testing"
+commit_message="${commit_message} ${current_branch} (${CI_COMMIT_SHA})"
+git commit --message="${commit_message}"
+
 echo "git push"
-git push --force "$DOWNSTREAM_CI_REPO" \
-    "___multi_ci___:multi-ci-${current_branch}"
+git remote add origin "$DOWNSTREAM_CI_REPO"
+git push --force origin "master:multi-ci-${current_branch}"
+
+rm -rf .git
+mv "$temp_dir/original-git-dir" .git
+git reset --hard HEAD
diff --git a/lib/spack/spack/cmd/release_jobs.py b/lib/spack/spack/cmd/release_jobs.py
index 837065824a0c644996a41acb2933dd36a3f5eada..65ba42053d185147c45843c4857b4020b1857724 100644
--- a/lib/spack/spack/cmd/release_jobs.py
+++ b/lib/spack/spack/cmd/release_jobs.py
@@ -646,9 +646,8 @@ def release_jobs(parser, args):
         'variables': {
             'MIRROR_URL': mirror_urls[0],
         },
-        'image': 'scottwittenburg/spack_ci_generator_alpine',
         'script': './bin/rebuild-index.sh',
-        'tags': ['spack-k8s']    # may want a runner to handle this
+        'tags': ['spack-post-ci']    # may want a runner to handle this
     }
     output_object['rebuild-index'] = final_job
     stage_names.append(final_stage)
diff --git a/lib/spack/spack/cmd/upload_s3.py b/lib/spack/spack/cmd/upload_s3.py
index 9013d612f8db5763b1b1c7fc090afdb3ee1b69ee..f3be69c10db93d267480b423afe117a6febf2c9c 100644
--- a/lib/spack/spack/cmd/upload_s3.py
+++ b/lib/spack/spack/cmd/upload_s3.py
@@ -67,7 +67,7 @@ def get_s3_session(endpoint_url):
         raise SpackError('boto3 module not available')
 
     session = boto3.Session()
-    s3 = session.resource('s3')
+    s3 = session.resource('s3', endpoint_url=endpoint_url)
 
     bucket_names = []
     for bucket in s3.buckets.all():