Skip to content

Image that references GH_ACCESS_TOKEN #4

Description

@alex-96-eng

I am trying to use this actions file, but I get an error because my image references an internal private repo. Here is the image:

FROM python:3.10-alpine

ENV LISTEN_PORT=8000
EXPOSE 8000

WORKDIR /app
ARG GH_ACCESS_TOKEN
COPY requirements.txt /

RUN apk update && \
  apk add --no-cache --virtual .build-deps cargo make gcc g++ python3-dev musl-dev libxml2-dev libxslt-dev libffi-dev openssl-dev && \
  apk add --no-cache postgresql-dev libstdc++ libxslt git && \
  git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ && \
  pip install --no-cache-dir -U pip wheel versioneer && \
  pip install --no-cache-dir -r /requirements.txt && \
  apk del .build-deps

The actions file fails due to this line:

git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ && \

because:

#8 20.38   Running command git clone --filter=blob:none --quiet https://github.com/sayhiya-org/core-commons /tmp/pip-install-0_bkim9g/commons_9840c85f3d994d04be3a73d4d994c6fd
#8 20.57   fatal: could not read Password for 'https://github.com/': No such device or address
#8 20.57   error: subprocess-exited-with-error

How can I pass through the password?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions