I am trying to use Jenkins to publish npm packages to a private npm repository. I use the config-file-provider plugin to create a new npm config file.
Creating the config looks like this:
The credentials used in that config is a "username with password" credentials configured with the correct username/password for publishing to my repository.
The publish part of my Jenkinsfile looks like:
When I run the build I get the following error when it tries to publish:
I did a little debugging. I was able to find the file it claims to have used as it's npm config:
I have found no information online about the :username and :_password properties being supported by NPM. Everything I have found has said that the .npmrc config file should have an _authToken property like this:
What am I doing wrong?