[BUG] npm install <git remote url> when git group/namespace starts with a number #7255
Open
2 tasks done
Labels
Bug
thing that needs fixing
Documentation
documentation related issue
Priority 2
secondary priority issue
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Running the following command does not work:
Note that 1example/common-code.git is not a real repository. It is just used to demonstrate the issue.
The problem is that the group/namespace/org part that is named
1example
in this example begins with a number. The full format for the npm install command for this is as follows:<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
Here we can clearly see that the
:
can be used for both theport
and thepath
parts. So I guess that because1example
begins with a number it is treated as the port and therefore this fails. Note that I am not sure this is the case, just a guess based on the behaviors I have seen.Expected Behavior
I would expect that
1example
is treated as a group/namespace/org and not as a port since1example
is not a valid port.I would expect that the
npm install git+ssh://git@github.com:1example/common-code.git
command works and the package is installed (assuming the command actually points to a real repository which it is not in this example)Steps To Reproduce
npm install git+ssh://git@github.com:<group/namespace/org>/<repo.name>.git
against the repository that was created in step 1Environment
The text was updated successfully, but these errors were encountered: