npm adduser via bash

前端 未结 9 1413
清歌不尽
清歌不尽 2021-02-01 18:48

I want to automate the npm login process via a bash script.

I tried it with this snippet:

/usr/bin/expect -f - <

        
9条回答
  •  长情又很酷
    2021-02-01 19:21

    I don't know if it is in any way secured so please do some research before.

    But the fact is that npm is storing all those informations into a file. If you look at:

    cat ~/.npmrc
    

    It could be interesting enough so you could do the login dance only once.

提交回复
热议问题