I want to automate the npm login process via a bash script.
I tried it with this snippet:
/usr/bin/expect -f - <
For people working with a private registry (typically for CI purpose), reaching directly the Rest API may be a solution :
curl -XPUT -H "Content-type: application/json" -d '{ "name": "your_username", "password": "your_password" }' 'http://localhost:4873/-/user/org.couchdb.user:your_username'
This is what npm adduser
is doing behind the scene.