Switch to ssh for private git requirements (#6838)

This commit is contained in:
Hao Liu
2025-02-17 22:44:29 -05:00
committed by GitHub
parent 376a791052
commit c0b9d3f428
7 changed files with 76 additions and 23 deletions

View File

@@ -22,6 +22,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled crb && \
dnf -y install \
openssh-clients \
iputils \
gcc \
gcc-c++ \
@@ -50,6 +51,10 @@ RUN dnf -y update && dnf install -y 'dnf-command(config-manager)' && \
xmlsec1-devel \
xmlsec1-openssl-devel
# Add github.com to known hosts
RUN mkdir -p ~/.ssh && chmod 0700 ~/.ssh
RUN ssh-keyscan github.com > ~/.ssh/known_hosts
RUN pip3.11 install -vv build
{% if image_architecture == 'ppc64le' %}
@@ -70,7 +75,7 @@ ADD requirements/requirements.txt \
/tmp/requirements/
RUN git config --global credential.helper "store --file=/tmp/requirements/requirements_git.credentials.txt"
RUN cd /tmp && make requirements_awx
RUN --mount=type=ssh cd /tmp && make requirements_awx
ARG VERSION
ARG SETUPTOOLS_SCM_PRETEND_VERSION