5

I'm trying to install a npm package from a git repository from our server. When I now do: npm i git+ssh://[email protected]/path/to/rep I get stuck at

⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session 42afea5547108748

It just stops working, no errors shown.

thanks in advance

Edit:

  • OS: MacOS Mojave
  • Shell: zsh
  • Auth: I do have a private key that I would have to type in my password. Alternatively I could type in the user password manually – To clarify, I do not actually authenticate. I assumed that it would prompt me. How would I do such a thing?
  • Command Prompt: VS Code integrated terminal, newest version (not sure if that is the requested info)

If I press enter rapidly I get (note line 1):

Enter passphrase for key '/Users/elias/.ssh/shop_dev': -session dfa32709de1392f7
⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session dfa32709de1392f7
⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session dfa32709de1392f7
⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session dfa32709de1392f7
⸨░░░░░░░░░░░░░░░░░░⸩ ⠧ rollbackFailedOptional: verb npm-session dfa32709de1392f7

But no response when I enter the password. Neither certificates key nor with the passphrase of the user.

3
  • 1
    What's your OS and bash / command prompt type and version? How do you authenticate? I suspect either a problem or an invisible credentials prompt. Commented Oct 14, 2019 at 13:32
  • Added some info. Sorry I didn't suspect that the problem could be ssh Commented Oct 14, 2019 at 13:35
  • @G.Stoynev btw, I also suspect a problem :P Commented Oct 14, 2019 at 13:50

2 Answers 2

3

Been through exactly same issue on a different OS and different bash.

Pls see this: npm install not prompting passphrase required - you can try typing your pass phrase when the hang occurs.

Or, to diagnose it another way, if you can, temporarily create and try with a key that is not password-protected. If that works, then you have to see which component acts as your ssh authentication agent (ssh-agent?).

In my case I reconfigured VSCode to use a different bash - one that I knew was playing nice with my passphrase-protected key.

Perhaps this URL will give you some pointers: Generating a new SSH key and adding it to the ssh-agent

-- Edit 1 --

In your case (MacOS) it looks like the tool you may want to look into for help with providing the interaction is sshpass (enter link description here)

-- Edit 2 --

Since you confirmed that password-less key works just fine, you have at least these three options, assuming you are doing this interactively (for scripting options are different):

  • figure out how to enter pass phrase while "hung", if possible (some people indicate it is - see the bug link above)
  • Use an agent that plays nice with your shell; that worked for me, but I didn't like having that extra "agent". Instead I opted for...
  • Reconfigure VS Code to use a different shell - one which plays nice with the password-protected key interaction. What worked for me was the bash included with my git install.

In your case (MacOS) it looks like the tool you may want to look into for help with providing the interaction is sshpass (enter link description here)

Sign up to request clarification or add additional context in comments.

7 Comments

hmpf: "if you can" I could but I shouldn't. It's even a stretch that I can use key auth and not have to type in the password :/
Added some stuff my my question
Why should you not quickly try a key that's not password-protected - this is just to zero down on the issue. Once you know, you will destroy it. Using sshpass is a similar alternative, but with it it's adding to the magic, rather than thinning it :-) In any case, I am only hoping that sharing what worked for me is of some help to you
Actually I spammed my key and it continued. Now I'm stuck at ⸨ ░░░░░░░░░░░⸩ ⠴ extract:module-name: timing audit body Completed in 1ms
This is really annoying -.-
|
1

Had the same issue and this post of GitHub explains how to solve it very easily.

all you need is adding the following lines to this file ~/.ssh/config

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/{your private key file name}

2 Comments

But you would still need to enter the identity's password...
At least for the first time. But maybe a reasonable workaround for MacOs, or any other Os / desktop environment that support some type of secret storage, integrated with the ssh-agent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.