From 9b473150249893554080b8968c812f17e14b3393 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Fri, 7 Jul 2023 01:43:04 +0800 Subject: [PATCH] use access token for gitea --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dcaa7c..9317deb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,12 @@ FROM golang:1.20-alpine as builder RUN apk add --no-cache gcc musl-dev binutils-gold linux-headers git -# FIXME - setup for dev deps -RUN apk add --no-cache openssh -COPY _dev/.ssh /root/.ssh -COPY _dev/.gitconfig /root/ +# Configure creds for gitea +ARG GITEA_TOKEN +RUN echo $GITEA_TOKEN > ~/.token +RUN git config --global credential.username _ # ignored, but prevents prompt +RUN git config --global credential.helper \ + '!f() { test "$1" = get && echo "password=$(cat $HOME/.token)"; }; f' WORKDIR /plugeth-statediff/