From a091ced17c9fb56cc29cc41848035de7dae45b40 Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Mon, 26 Oct 2020 09:33:31 -0600 Subject: [PATCH 1/2] gitTags: Include auth in url. #748 --- lib/package-managers/gitTags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/package-managers/gitTags.js b/lib/package-managers/gitTags.js index c474edf5..d793788b 100644 --- a/lib/package-managers/gitTags.js +++ b/lib/package-managers/gitTags.js @@ -8,8 +8,8 @@ const { print } = require('../logging') /** Return the highest numbered tag on a remote Git URL. */ const greatest = async (name, version, options) => { - const { protocol, host, path } = parseGithubUrl(version) - const url = `${protocol ? protocol.replace('git+', '') : 'https:'}//${host}/${path}` + const { auth, protocol, host, path } = parseGithubUrl(version) + const url = `${protocol ? protocol.replace('git+', '') : 'https:'}//${auth || ''}${host}/${path}` let tagMap = new Map() // fetch remote tags From 70df6c6032a761a00115c815247b15ebab22aa81 Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Mon, 26 Oct 2020 17:24:37 -0600 Subject: [PATCH 2/2] gitTags: Add missing "@" to auth in url. #749 --- lib/package-managers/gitTags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/package-managers/gitTags.js b/lib/package-managers/gitTags.js index d793788b..a8989974 100644 --- a/lib/package-managers/gitTags.js +++ b/lib/package-managers/gitTags.js @@ -9,7 +9,7 @@ const { print } = require('../logging') /** Return the highest numbered tag on a remote Git URL. */ const greatest = async (name, version, options) => { const { auth, protocol, host, path } = parseGithubUrl(version) - const url = `${protocol ? protocol.replace('git+', '') : 'https:'}//${auth || ''}${host}/${path}` + const url = `${protocol ? protocol.replace('git+', '') : 'https:'}//${auth ? auth + '@' : ''}${host}/${path}` let tagMap = new Map() // fetch remote tags