Yarn: Yarn CLI output hides SSH key password prompt

Created on 15 Feb 2017  路  6Comments  路  Source: yarnpkg/yarn

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

bug

What is the current behavior?

When yarn install hits a package installed from a GitHub repo using an SSH URI, yarn appears to hang on the package forever. It turns out that a request for the SSH key password was printed, but that output got overwritten by the output of Yarn.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Create an SSH that requires a password to use
  2. Register the SSH key with github
  3. Add a GitHub repo to a package.json file wth the ssh URI (e.g. git+ssh://[email protected]/...)
  4. Run yarn install

What is the expected behavior?

The output for the SSH key's password appears so the user can input the password and continue the installation process.

Please mention your node.js, yarn and operating system version.

  • yarn: 0.20.3
  • node: v6.4.0
  • OS: Ubuntu 12.04.5

Most helpful comment

This issue also stemmed from an invisible ssh key password prompt. I was using a fresh setup from a clean macOS install when I ran into the problem and had not yet remembered to add my ssh key to the ssh agent. After doing so the problem was resolved.

All 6 comments

The workaround to this issue is to type the SSH key password once yarn seems to hang (or type a bogus password and press enter to trigger an input retry to be correctly printed).

Running into this too, the first prompt is actually for a username and dosen't appear

Seeing this as well. Pressing enter will cause the command to fail because it can't unlock the key.

Ran into the same problem. After running yarn install --verbose for a 3rd time, we were prompted for an ssh key. I don't think there's any magic to the 3 here, just that we got lucky that

System:

  • yarn 0.21.3
  • node v6.4.0
  • OS: Ubuntu 12.04.5 LTS

Not sure if this matters:

  • npm 3.10.3

This issue also stemmed from an invisible ssh key password prompt. I was using a fresh setup from a clean macOS install when I ran into the problem and had not yet remembered to add my ssh key to the ssh agent. After doing so the problem was resolved.

I noticed a comment in #3699 indicates that the recommended approach is to set a pwd with your ssh agent.

2882 also indicates that this isn't likely to be fixed.

Was this page helpful?
0 / 5 - 0 ratings