Original post

I’m trying to access a private remote package on my firm’s Github inside a CircleCI’s job. I’ve managed to get it in the test job, with:

git config --global url."https://{user}:${token}@github.com/".insteadOf "https://github.com/"

But somehow, this command doesn’t work in the build job. I have this error at the Build app Docker image step, when “RUN go mod download” is launched :

fatal: could not read Username for 'https://github.com': terminal prompts disabled

I’ve read a lot of issues about it (this Medium sums up soluces I’ve tried), but nothing works.

Any idea ? Many thanks !