github-action icon indicating copy to clipboard operation
github-action copied to clipboard

[Question] Can I fetch dependacies from a private repo?

Open khamiltonuk opened this issue 3 years ago • 0 comments

Firstly thank you for your repo

What's the problem I have supplied my github token and my .npmrc but it I still get 401 Unauthorized when trying to fetch my dependancies

this is my config

name: End-to-end tests
on: [push]
jobs:
  cypress-run:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Cypress install
        uses: cypress-io/github-action@v4
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_RC: ${{ secrets.NPM_RC }}
      # Install NPM dependencies, cache them correctly
      # and run all Cypress tests
      - name: Cypress run
        uses: cypress-io/github-action@v4

but this is my output

Run cypress-io/github-action@v4
/usr/local/bin/yarn --frozen-lockfile
yarn install v1.22.18
[1/4] Resolving packages...
warning Resolution field "@babel/[email protected]" is incompatible with requested version "@babel/[email protected]"
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[2/4] Fetching packages...
error An unexpected error occurred: "https://npm.pkg.github.com/download/XXXXXX: Request failed \"401 Unauthorized\"".
info If you think this is a bug, please open a bug report with the information provided in "/home/runner/work/workflow-client/workflow-client/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: The process '/usr/local/bin/yarn' failed with exit code 1

khamiltonuk avatar Jun 10 '22 15:06 khamiltonuk