Cannot build docker due to Auth issue
Closed this issue · 1 comments
mielvds commented
@lem-onade, all I'm getting this authentication error and I can't resolve it.
- I created a Personal access token with
repo, write:packages
permission - I put this token in
NPM_TOKEN
when runningdocker build --build-arg NPM_TOKEN=$NPM_TOKEN -t crs:local ./packages/solid-crs-manage/
Any ideas?
#0 24.35 npm ERR! code E401
#0 24.35 npm ERR! 401 Unauthorized - GET https://npm.pkg.github.com/@digita-ai%2finrupt-solid-service - authentication token not provided
#0 24.36
#0 24.36 npm ERR! A complete log of this run can be found in:
#0 24.36 npm ERR! /root/.npm/_logs/2023-05-31T09_56_54_627Z-debug.log
------
Dockerfile:7
--------------------
6 | COPY .npmrc ./
7 | >>> RUN echo "//npm.pkg.github.com/:_authToken=$NPM_TOKEN" >> .npmrc && \
8 | >>> npm install && \
9 | >>> rm -f .npmrc
10 | COPY . .
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"//npm.pkg.github.com/:_authToken=$NPM_TOKEN\" >> .npmrc && npm install && rm -f .npmrc" did not complete successfully
mielvds commented
I got it to work after juggling some env/build vars