node.js - npm prompt user for password behind corporate proxy -


when using npm behind corporate proxy have need have following configurations in .npmrc file in user home directory.

proxy = http://<username>:<pass>@<proxy_host>:<proxy_port>/ registry = http://registry.npmjs.org/ https-proxy = http://<username>:<pass>@<proxy_host>:<proxy_port>/    

while works fine, there need hardcode password in .npmrc file. corporate password change policy mandates change password after period of time.

is there way/configuration prompt user password instead of having in .npmrc file. may way works git clone asks password while cloning if repository password protected.

you can install sync-prompt module:

npm install sync-prompt 

and modify npm-registry-client/index.js slightly.

see article details , code need add:


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -