Uh oh!
There was an error while loading. Please reload this page.
fix!: Preserve https protocol when working with git - #8703
Conversation
Hm. Tests work fine, but in reality, nothing changed ( |
oldium
commented
Oct 27, 2025
It seems also https://github.com/npm/pacote needs the same fix |
oldium
commented
Oct 27, 2025
The |
675a3c8 to
a2ceccdCompareWhen the URL explicitly contains https, do not try to switch to ssh. This change is necessary for [npm][3] to retain the protocol, please see the link and the referenced issues [here][1] and [here][2] reporting problems when using ssh instead of requested https. [1]: npm/cli#2610 [2]: npm/cli#4305 [3]: npm/cli#8703 Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Fixed, tested, should work now. The fix in |
This comment was marked as outdated.
This comment was marked as outdated.
When the URL explicitly contains https, do not try to switch to ssh. This change is necessary for [npm][3] to retain the protocol, please see the link and the referenced issues [here][1] and [here][2] reporting problems when using ssh instead of requested https. [1]: npm/cli#2610 [2]: npm/cli#4305 [3]: npm/cli#8703 Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
oldium
commented
Jan 18, 2026
Rebased to latest |
BREAKING CHANGE: git specs using the `https` or `git+https` protocol now resolve to `git+https` URLs instead of being switched to `git+ssh`. Shortcut specs (e.g. `github:user/repo`, `user/repo`) and `git+ssh`/`git://` specs are unchanged. When the URL explicitly contains https, do not try to switch to ssh. This change is necessary for [npm][3] to retain the protocol, please see the link and the referenced issues [here][1] and [here][2] reporting problems when using ssh instead of requested https. [1]: npm/cli#2610 [2]: npm/cli#4305 [3]: npm/cli#8703 ## References Relates to npm/cli#8703 Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
owlstronaut
commented
Apr 29, 2026
Hello @oldium ! I'm working on getting this guy in for npm@12. Do you want to bring it up to date? |
oldium
commented
Apr 29, 2026
I see there is a new version of pacote, so sure, I will rebase. Thanks for letting me know. |
oldium
commented
May 1, 2026
I tried to rebase, but the release of pacote v22.0.0 is not yet finished. I can add the pacote update into this PR when the release is made. |
owlstronaut
commented
May 1, 2026
Ah gotcha. We are going to be bumping engines once the new nodejs comes out, should be Tuesday. Then I'll start hitting all the releases that need to happen so should be soon then |
oldium
commented
May 1, 2026
Rebased to latest, tested with pacote update and https is preserved - tested with the tree here https://github.com/oldium/npm-cli/commits/fix/git-https-full/. The pacote library is used internally inside workspaces (easy to upgrade), but also as external So merging this is one step towards having this fixed finally. Update of pacote is the last missing piece. |
owlstronaut
commented
Jun 18, 2026
@oldium Sorry that took so long, it is a big coordinated effort to get the supported engine versions bumped throughout the project. We should be able to see this work with a rebase! |
Sure, happy to rebase. Give me a day, will do it :-) |
Rebased, Linux tests are passing (running test suite on Windows fails, unrelated to this work). Local test with Before ( diff --git a/package-lock.json b/package-lock.json
index 3476549..6d53e33 100644
--- a/package-lock.json+++ b/package-lock.json@@ -16,7 +16,7 @@
"dotenv": "^17.4.2",
"entities": "^8.0.0",
"escape-html": "^1.0.3",
- "eta": "^4.6.0",+ "eta": "github:bgub/eta#main",
"etag": "^1.8.1",
"express": "^5.2.1",
"fast-glob": "^3.3.3",
@@ -5504,8 +5504,7 @@
},
"node_modules/eta": {
"version": "4.6.0",
- "resolved": "https://registry.npmjs.org/eta/-/eta-4.6.0.tgz",- "integrity": "sha512-lW6is4T1NFOYnmqGZIfvixqj7A7sSvScF+DN8EK6K58xI5MZ5UvYe0GjopxOXQtZvUn4eDdVuZ8XSoYWTMEKwA==",+ "resolved": "git+ssh://git@github.com/bgub/eta.git#7e8b40362151cc41d114bdf4ba78336949c94260",
"license": "MIT",
"engines": {
"node": ">=20"After ( diff --git a/package-lock.json b/package-lock.json
index 3476549..adb85d6 100644
--- a/package-lock.json+++ b/package-lock.json@@ -16,7 +16,7 @@
"dotenv": "^17.4.2",
"entities": "^8.0.0",
"escape-html": "^1.0.3",
- "eta": "^4.6.0",+ "eta": "git+https://github.com/bgub/eta.git#main",
"etag": "^1.8.1",
"express": "^5.2.1",
"fast-glob": "^3.3.3",
@@ -5504,8 +5504,7 @@
},
"node_modules/eta": {
"version": "4.6.0",
- "resolved": "https://registry.npmjs.org/eta/-/eta-4.6.0.tgz",- "integrity": "sha512-lW6is4T1NFOYnmqGZIfvixqj7A7sSvScF+DN8EK6K58xI5MZ5UvYe0GjopxOXQtZvUn4eDdVuZ8XSoYWTMEKwA==",+ "resolved": "git+https://github.com/bgub/eta.git#7e8b40362151cc41d114bdf4ba78336949c94260",
"license": "MIT",
"engines": {
"node": ">=20" |
Uh oh!
There was an error while loading. Please reload this page.
owlstronaut
commented
Jun 19, 2026
Thank you for sticking with this @oldium ! Appreciate you! |
This prevents changing URLs from
httpsandgit+httpsintogit+ssh, but keeps the fall-back togit+sshwhen the protocol is not specified.The change in pacote is necessary in order to have this fully working.
References
Supersedes #5256
Blocked by npm/pacote#434
Fixes#4305
Fixes#2610