question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

usage with jfrog artifactory?

See original GitHub issue

I’ve been struggling with using this action with my on-premise artifactory instance (to save a release) and it looks like authTokens are not only not supported by it, but it also causes its URL parser to trip. I’ve tried reproducing what the action is doing in a simple docker image and with the following steps roughly, I get the 404 that leads me to believe artifactory is parsing the :_authToken part wrong.

root@fb783c33d81c:/data# npm config set registry https://internal.service/artifactory/api/npm/npm-release
root@fb783c33d81c:/data# npm config set always-auth true
root@fb783c33d81c:/data# export NODE_AUTH_TOKEN=XXXXX-XXXXX-XXXXX-XXXXX
root@fb783c33d81c:/data# export npm_config__auth=YXJ0aW....qSzJtVw==
root@fb783c33d81c:/data# npm i --ignore-scripts
npm ERR! code E404
npm ERR! 404 Not Found - GET https://internal.service/artifactory/api/npm/npm-snapshot:_authToken=XXXXX-XXXXX-XXXXX-XXXXX/resize-observer-polyfill

Am I doing things wrong here? Is it within the scope of this action / development to support e.g. artifactory? Should I send a pull request that gets rid of auth tokens and allows working with e.g. the basic _auth method?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
lub0v-parsablecommented, Sep 14, 2020

I couldn’t make @Lykathia’s setup to work, so as a workaround, I had to create .npmrc “manually” before calling the actions/setup-node@v1

steps:
  - name: 'Checkout'
    uses: actions/checkout@v2

  - name: 'Create .npmrc'
    shell: bash
    run: |
      echo "registry=https://company.jfrog.io/artifactory/api/npm/npm-registry-name/" > .npmrc
      echo "_auth = ${{ secrets.JFROG_NPM_AUTH_TOKEN }}" >> .npmrc
      echo "always-auth = true" >> .npmrc

  - name: Use Node.js
    uses: actions/setup-node@v1
    with:
       node-version: '10.14.0'

make sure to remove the registry-url from the actions/setup-node@v1 because otherwise it will override the .npmrc.

3reactions
shawnsparks-workcommented, Jul 1, 2020

I found we need to be able to set registry, _auth, email, and always-auth in npmrc file to work with Artifactory. I believe _auth and email are the two which are missing from this currently.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JFrog Artifactory - JFrog - JFrog Documentation
JFrog Artifactory is a universal DevOps solution providing end-to-end automation and management of binaries and artifacts through the ...
Read more >
Artifactory: A repository for all software package types - IBM
JFrog Artifactory is a repository manager that supports all available software package types, enabling automated continous integration and delivery. Add ...
Read more >
What is Jfrog Artifactory — its component and Features
Artifactory is a repository manager created by JFrog. A repository manager is a dedicated server application designed to manage binary ...
Read more >
What is Artifactory? - Packagecloud Blog
JFrog Artifactory is a universal DevOps solution that manages and automates artifacts and binaries from start to finish during the application ...
Read more >
terminology - What is an artifactory? - DevOps Stack Exchange
Artifactory is a product by JFrog that serves as a binary repository manager. That said very often one will use a 'artifactory' as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found