pnpm: pnpm install bug on certainly formed git+ssh repository URLs
I’m seeing that pnpm finally supports git+ssh, but there is a parsing bug on certainly formed repository URLs. The test case is simple:
git+ssh://git@gitlab.domain.tld:/myproject/myrepo.git#master
does work,
while
git+ssh://git@gitlab.domain.tld:myproject/myrepo.git#master
does not, throwing the following error:
ssh: Could not resolve hostname gitlab.domain.tld:myproject: Name or service not known
myproject
seems to be interpreted as a host port instead of what it really is.
By default, self-hosted GitLab gives the second format, so it would be really useful to support it.
Thank you very much!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (12 by maintainers)
Commits related to this issue
- fix(git+ssh): git clone with correct ssh URL Close #419 — committed to pnpm/pnpm by zkochan 7 years ago
- fix(git+ssh): git clone with correct ssh URL Close #419 — committed to pnpm/pnpm by zkochan 7 years ago
- fix(resolve): normalize SSH URLs Close #419 — committed to pnpm/pnpm by zkochan 7 years ago
Here it is:
This Issue is quite hold, but I’m experiencing an Issue heavily related:
(Notice the different chars after
*.server
)pnpm install git+ssh://git@private.gitlab.server/something/repo
(works)pnpm install git+ssh://git@private.gitlab.server:/something/repo
(works)pnpm install git+ssh://git@private.gitlab.server:something/repo
(works not)Whereas (3) also works with standard npm.
Encountered this, since we have (3) in some
package.json
files which formerly were handled via npm (and everything worked as expected) but encounteredInvalid URL: git+ssh://[...]
Error withpnpm
.Imo
pnpm
should handle all the git url forms thatnpm
handles…Works great! Thank you very much!