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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -