본문 바로가기

node

npm private repository 배포

자주사용하는 관련 명령어

npm whoami
npm logout
npm config set _auth @@@
npm config set always-auth true
npm publish

install

npm -registry http://nexusrepo.넥서스url/repository/npm-repository-private/login
npm -registry http://nexusrepo.넥서스url/repository/npm-repository-group/ install

 

1. 로그인

npm login -registry=http://nexusrepo.넥서스url/repository/npm-repository-private/

 

2. 1번 혹은 .npmrc 에 repository와 token설정

_auth:@@@
registry=http://nexusrepo.넥서스url/repository/npm-repository-group/

 

token은 아이디:패스워드를 base64로 암호화

echo -n '아이디:패스워드' | openssl base64

 

package.json

  "version": "0.0.1",
  "publishConfig": {
    "registry": "http://nexusrepo.넥서스url/repository/npm-repository-private/"
  },

 

참고사이트

Npm Docs

https://docs.npmjs.com/cli/v7/commands/npm-logout

 

npm-logout | npm Docs

Log out of the registry

docs.npmjs.com

 

'node' 카테고리의 다른 글

[ngrok] 외부에서 로컬로 접속해서 개발하기  (0) 2022.05.17
NVM 자주쓰는 명령어  (0) 2022.03.23
mac homebrew로 nvm 설치  (0) 2022.03.23
npm version 의존성 관리  (0) 2022.02.07
Node 명령어  (0) 2022.01.12