Skip to content

Git w/ Non Standard Port Broken on Poetry 1.0.0b4 #1557

@iwoloschin

Description

@iwoloschin
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: macOS 10.14.6

  • Poetry version: 1.0.0b4

  • Link of a Gist with the contents of your pyproject.toml file: See Below

Issue

I'm trying to use a git+ssh URL to a private repo using a non standard port, like this:

package = {git = "ssh://[email protected]:1234/repo/project.git"}

This leads to an error like this:

[ValueError]
Invalid git url ""

I think the issue may be here:
https://github.com/sdispater/poetry/blob/master/poetry/vcs/git.py#L16

Specifically, I think this regex is broken:

r"(:?P<port>[\d]+)?"

Instead, I think it should look like:

r"(?P<port>:[\d]+)?"

If someone doesn't beat me to it I'll likely submit a PR later today or tomorrow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions