Yarn: Yarn not using correct SSH port for git+ssh

Created on 14 Apr 2017  路  5Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
A bug.

What is the current behavior?
I have some dependencies on a private Gitlab instance, mentionned like this :

"dependencies": {
    "my-package": "git+ssh://[email protected]:10202/project-name/my-package.git"
}

As you can see I use a custom port to SSH my Gitlab. It used to works perfectly but since version 0.23.2 I cannot install/update those dependencies. Yarn always use port 22 for SSH connection.

If the current behavior is a bug, please provide the steps to reproduce.
Use git+ssh dependencies on a Git server not using port 22.

What is the expected behavior?
Yarn should use the port mention on the dependency URL for SSH connection. It can be tricky since Github seems to use semicolon in private repository path...

Please mention your node.js, yarn and operating system version.
Node : v7.9.0
Yarn : 0.23.2
OS : Debian Stretch (9.0) with 4.9.0-2-amd64 Linux kernel

Most helpful comment

The fix will be released along with the 0.24 build, which will be published somewhere this week.

All 5 comments

I'm seeing the same issue, and yarn is attempting to add a new entry in the ssh known_hosts file, resulting in a scary message.

Cleaning out known_hosts gets rid of the message, but then trying to run yarn or yarn upgrade results in a hang on the last dependency in the fetch step.

I tested this and it worked in yarn v0.22.0 and is broken in v0.23.0 - v0.23.2

Thanks @pornel !

I just upgrade to version 0.23.3 and still get the same error. Any idea ?

The fix will be released along with the 0.24 build, which will be published somewhere this week.

Was this page helpful?
0 / 5 - 0 ratings