Description
I am trying to set up JFrog’s Artifactory Pro (v 6.0.1) to store and cache dependencies of my projects. I want to use JFrog CLI to collect and publish the npm-build information to Artifactory just like it is described in this (https://jfrog.com/blog/npm-flies-with-jfrog-cli/) blog-post, but I want to be able to do it as a non-admin user.
Setup
Artifactory contains a virtual repository called npm, that is a collection of a local (named npm-local) and a remote (named npm-remote) repository.
There are two users: the user called admin that has admin access and a user called developer that does not have admin access.
Config for JFrog CLI:
# create a configuration for the admin
jfrog rt config --user=admin \
--password=admin \
--url=http://localhost:8081/artifactory \
--interactive=false rt_admin
# create a configuration for the developer
jfrog rt config --user=developer \
--password=developer \
--url=http://localhost:8081/artifactory \
--interactive=false rt_dev
What I am doing
For this test I am trying to build the simple-node-js-react-npm-app (https://github.com/jenkins-docs/simple-node-js-react-npm-app) and publish it to the local npm repository in Artifactory using the following JFrog CLI commands:
jfrog rt npm-install npm \
--build-name=simple \
--build-number=1.0.0 \
--server-id=rt_dev
this produces the following the following error just before the command is done (if errors during npm-install phase are ignored):
[Info] Collecting dependencies information, this might take several minuets...
[Error] Artifactory response: 400 Bad Request
For permissions reasons AQL demands the following fields: repo, path and name.
When i go on with
jfrog rt npm-publish npm \
--build-name=simple \
--build-number=1.0.0 \
--server-id=rt_dev
jfrog rt build-publish simple 1.0.0 --server-id=rt_dev
the freshly published artifact has zero dependencies.
If publish the same way as an admin
jfrog rt npm-install npm \
--build-name=simple \
--build-number=1.0.1 \
--server-id=rt_admin
jfrog rt npm-publish npm \
--build-name=simple \
--build-number=1.0.1 \
--server-id=rt_admin
jfrog rt build-publish simple 1.0.1 --server-id=rt_admin
i get over 1000 dependencies.
How can i get the same result as a non admin user?