Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- npm login << EOF
- username
- password
- email
- EOF
- Username: Password: npm ERR! cb() never called!
- npm ERR! not ok code 0
- TOKEN=$(curl -s
- -H "Accept: application/json"
- -H "Content-Type:application/json"
- -X PUT --data '{"name": "username_here", "password": "password_here"}'
- http://your_registry/-/user/org.couchdb.user:username_here 2>&1 | grep -Po
- '(?<="token": ")[^"]*')
- npm set registry "http://your_registry"
- npm set //your_registry/:_authToken $TOKEN
- {
- name: username,
- password: password
- }
- apt-get install expect-dev
- #!/usr/bin/expect -f
- # set our args into variables
- set i 0; foreach n $argv {set "p[incr i]" $n}
- set timeout 60
- #npm login command, add whatever command-line args are necessary
- spawn npm login
- match_max 100000
- expect "Username"
- send "$p1r"
- expect "Password"
- send "$p2r"
- expect "Email"
- send "$p3r"
- expect {
- timeout exit 1
- eof
- }
- expect -f npm_login_expect myuser mypassword "myuser@domain.com"
- export NPM_USERNAME=mUs34
- export NPM_PASSWORD=mypassW0rD
- export NPM_EMAIL=user@domain.com
- npm adduser<<!
- $NPM_USERNAME
- $NPM_PASSWORD
- $NPM_EMAIL
- !
- - echo "//<npm-registry>:8080/:_authToken=$AUTH_TOKEN" > ~/.npmrc
- - npm publish
- publish:
- stage: deploy
- only:
- - tags
- script:
- - yarn run build
- - echo "//<npm-registry>:8080/:_authToken=$NPME_AUTH_TOKEN" > ~/.npmrc
- - npm publish
- - echo 'Congrats on your publication!'
Add Comment
Please, Sign In to add comment