yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Using PAT to access private repository

Open Ciloe opened this issue 10 months ago • 0 comments

Hi there !

I tried to connect to a private repository with yarn. I added this line :

package.json

"dependencies": {
  "wtd-tsx": "git+https://<PAT>:[email protected]/<owner>/<repo>.git#main"
}

But I have this error in github action : Capture d’écran 2024-04-09 à 11 26 21

I tried to do some other things :

.yarnrc

"@repeaterstore:wtd-tsx" "https://npm.pkg.github.com"

Or add PAT in secrets in the workflow

      - name: Checkout
        uses: actions/checkout@v4
        with:
          ref: ${{ inputs.ref }}

      - uses: actions/[email protected]
        with:
          node-version: '18'

      - name: Install for CI
        env:
          NODE_AUTH_TOKEN: ${{ secrets.PAT }}
        run: yarn

This is the PAT config : Capture d’écran 2024-04-09 à 11 31 26

It's working fine in local

Have you got any other ideas ?

Ciloe avatar Apr 09 '24 09:04 Ciloe