diff --git a/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap b/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
index 92c2fd16d4c7651e738225e3f0ea9d9ead8f6c56..0628a164eed571036961a51037137d4c588a2479 100644
--- a/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
+++ b/lib/modules/manager/npm/extract/__snapshots__/index.spec.ts.snap
@@ -310,6 +310,19 @@ Object {
       "prettyDepType": "dependency",
       "sourceUrl": "https://github.com/owner/o",
     },
+    Object {
+      "currentRawValue": "Owner/P.git#v2.0.0",
+      "currentValue": "v2.0.0",
+      "datasource": "github-tags",
+      "depName": "p",
+      "depType": "dependencies",
+      "gitRef": true,
+      "githubRepo": "Owner/P",
+      "packageName": "Owner/P",
+      "pinDigests": false,
+      "prettyDepType": "dependency",
+      "sourceUrl": "https://github.com/Owner/P",
+    },
   ],
   "lernaClient": undefined,
   "lernaPackages": undefined,
diff --git a/lib/modules/manager/npm/extract/index.spec.ts b/lib/modules/manager/npm/extract/index.spec.ts
index 5226da0f7640ac08e57d78f591063b9f0d8a0721..06343c0a005a5f93deacf5059d2297ba2198825d 100644
--- a/lib/modules/manager/npm/extract/index.spec.ts
+++ b/lib/modules/manager/npm/extract/index.spec.ts
@@ -501,6 +501,7 @@ describe('modules/manager/npm/extract/index', () => {
           m: 'https://github.com/owner/m.git#v1.0.0',
           n: 'git+https://github.com/owner/n#v2.0.0',
           o: 'git@github.com:owner/o.git#v2.0.0',
+          p: 'Owner/P.git#v2.0.0',
         },
       };
       const pJsonStr = JSON.stringify(pJson);
@@ -592,6 +593,12 @@ describe('modules/manager/npm/extract/index', () => {
             datasource: 'github-tags',
             sourceUrl: 'https://github.com/owner/o',
           },
+          {
+            depName: 'p',
+            currentValue: 'v2.0.0',
+            datasource: 'github-tags',
+            sourceUrl: 'https://github.com/Owner/P',
+          },
         ],
       });
     });
diff --git a/lib/modules/manager/npm/extract/index.ts b/lib/modules/manager/npm/extract/index.ts
index 063e409100cf970b5c4a8e7138725f5ca0772f7a..d7e4dc835fd5f6e24878ac38c9dbf93380d9342b 100644
--- a/lib/modules/manager/npm/extract/index.ts
+++ b/lib/modules/manager/npm/extract/index.ts
@@ -306,7 +306,7 @@ export async function extractPackageFile(
       githubRepo = matchUrlSshFormat[2];
       githubOwnerRepo = `${githubOwner}/${githubRepo}`;
     }
-    const githubValidRegex = /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/; // TODO #12872 lookahead
+    const githubValidRegex = /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i; // TODO #12872 lookahead
     if (
       !githubValidRegex.test(githubOwner) ||
       !githubValidRegex.test(githubRepo)