Skip to main content

(Legacy) Authenticating to Agate Internal Verdaccio Registry

โœ Last Updated : November 21, 2022

๐Ÿšช Prequisite Knowledge (Optional)

UploadDescribe Initial Knowledge that reader need to know before reading this article

  1. [Installing Node.js To Your Windows Machine](Installing Node js To Your Windows Machine b78197dd346e46eaa3f2aeadef6bb1b2.md) - For NPM Command
  2. Accessing GateGit

โ“ Key Question / Problem / Issue

Describe what question / Problem / Issue this knowledge should answer

How To Authenticate yourself in Agate Internal Node Registry (Verdaccio)

โœ… Expected Output/Definition of Done

Define what information you really need and the definition of done

  1. Generate Gategit Access Token
  2. Can login to Agate Internal Node Registry (Verdaccio) through NPM CLI
  3. Can Login to http://gateverdaccio.agate.id/

๐ŸŽ Resulting Solution

Write writing results below

1) Create Your Personal Access Token In ProgressGitlab

  1. Go to https://gategit.agate.id/-/profile/personal_access_tokens
  2. Create Personal Access Token & Grant read_api permission

Untitled

c. Copy Your Personal Access Token

Untitled

d) Your Personal Access Token will become your password For Your GateVerdaccio Account (in step 2)

2) With NPM CLI, Login Your Verdaccio Account using Gitlab Account

npm adduser --registry http://gateverdaccio.agate.id --auth-type=legacy
  1. Use Gitlab Username as your Username
  2. Use Personal Access Token (in step 2d) as your Password

Result:

Untitled

3) Accessing your NPM Access token

in order to utilize gitlab ci to automate publish method you need to get access token from your .npmrc file.

To find your .npmrc you can write npm config list command to list all config file

Untitled

open .npmrc file in text editor and get access token.

you can read more about npmrc file below

npmrc | npm Docs