]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
containers/teuthology-dev: Remove access token 2018/head
authorZack Cerza <zack@redhat.com>
Mon, 6 Jan 2025 22:33:08 +0000 (15:33 -0700)
committerZack Cerza <zack@redhat.com>
Mon, 6 Jan 2025 22:33:10 +0000 (15:33 -0700)
This container is built and pushed via GitHub Actions. GHA likes to provision a
personal access token for each job that gives tightly-scoped access to the git
repository to the job. When we build our container, we end up including
`.git/config`, which contains the token. Later, in ceph-dev-stack's CI, an
`ls-remote` is run against ceph.git, which ends up causing git to prompt for
credentials even though the repo is public. Removing the token should allow
reading all the relevant repos from the built container image.

Signed-off-by: Zack Cerza <zack@redhat.com>
containers/teuthology-dev/Dockerfile

index 34263045bc18c86a91eb1a1abcfa4972c7a71af9..97e0677efe9916ad62a8974ae9a7da66e55304e4 100644 (file)
@@ -29,6 +29,7 @@ RUN \
     PIP_INSTALL_FLAGS="-r requirements.txt" ./bootstrap
 COPY . /teuthology
 RUN \
+    git config -f ./.git/config --unset 'http.https://github.com/.extraheader' && \
     ./bootstrap
 COPY containers/teuthology-dev/containerized_node.yaml /teuthology
 COPY containers/teuthology-dev/.teuthology.yaml /root