From 7e3d8988cb916665df5cf7dc2d44ca4493897b75 Mon Sep 17 00:00:00 2001
From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Date: Thu, 8 Jul 2021 17:27:39 +0200
Subject: [PATCH] docs: add authentication example (#10574)

---
 docs/usage/private-npm-modules.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/docs/usage/private-npm-modules.md b/docs/usage/private-npm-modules.md
index e85b88bf46..3ec9aebd51 100644
--- a/docs/usage/private-npm-modules.md
+++ b/docs/usage/private-npm-modules.md
@@ -151,3 +151,20 @@ The end-result looks like this:
 ```
 
 However be aware that if your `.npmrc` is too long to encrypt then the above command will fail.
+
+### Automatically authenticate for npm package stored in private GitHub npm repository
+
+```json
+{
+  "hostRules": [
+    {
+      "matchHost": "https://npm.pkg.github.com/",
+      "hostType": "npm",
+      "encrypted": {
+        "token": "<Encrypted PAT Token>"
+      }
+    }
+  ],
+  "npmrc": "@organizationName:registry=https://npm.pkg.github.com/"
+}
+```
-- 
GitLab