Pre-requisites
Before diving into development, ensure you have the necessary credentials and software.
Required Credentials
- GitLab Access: You should have received your GitLab credentials via LastPass.
- NPM Registry Token: A token for accessing Invent's private NPM packages.
- Portal Link: A link to your Invent portal.
Software Installation
1. Visual Studio Code (VS Code)
We use VS Code for its flexibility and cross-platform compatibility.
- Download and install VS Code from code.visualstudio.com/download.
2. Git
Git is essential for version control and interacting with our GitLab repositories.
- Install Git following the instructions for your operating system at git-scm.com/book/en/v2/Getting-Started-Installing-Git.
- Verify the installation by running this command in your terminal:
git --version
- Expected output (example):
git version 2.48.1.windows.1
3. Node.js
Node.js is required for managing dependencies and running the development environment.
- Download and install Node.js from nodejs.org/en/download.
- Verify the installation by running this command in your terminal:
node --version
- Expected output (example):
v16.18.0
Access Configuration
1. Configure NPM Token
To access Invent's private NPM packages, follow these steps:
- Set the Registry:
- Run:
npm config set @invent:registry https://gitlab.apptrium.io/api/v4/packages/npm/
NOTE: This command configures the
@inventscope to use your GitLab NPM registry.
- Run:
- Set the Authentication Token:
- Run:
npm config set //gitlab.apptrium.io/api/v4/packages/npm/:_authToken=<YOUR_NPM_TOKEN>
NOTE: Replace
<YOUR_NPM_TOKEN>with your actual token.
- Run:
- Verification:
- You can verify the settings by using
npm config list. This will display your NPM configuration, and you should see the registry and the authentication token settings.
- You can verify the settings by using
2. Set Up SSH Key for GitLab
SSH keys enable secure communication with GitLab. Follow these steps:
- Generate an SSH Key:
- Run:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
- When prompted, choose a file to save the key, or press Enter for the default location.
- Set a passphrase for added security.
- Run:
- Copy the Public SSH Key:
- Run
cat ~/.ssh/id_rsa.pub
- Copy the output.
- Run
- Add the Key to GitLab: (click here to learn more)
- Log in to your Invent GitLab account.
- Go to Preferences (via your profile picture).
- Select SSH Keys from the left sidebar.
- Click Add new key.
- Paste the copied key into the Key field.
- Provide a descriptive Title (e.g. "Work Laptop").
- Click Add Key.
- Test the Connection:
- Run
ssh -T git@gitlab.apptrium.io
- Output should look like:
Welcome to Gitlab, @<account.name>
- Run