Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No private key password asked #119

Closed
txgruppi opened this issue Apr 4, 2017 · 5 comments
Closed

No private key password asked #119

txgruppi opened this issue Apr 4, 2017 · 5 comments

Comments

@txgruppi
Copy link

txgruppi commented Apr 4, 2017

I'm following the Getting started guide and I run in a problem when trying to import babel. It complains about trying to read my encrypted private key without a password but no password was asked.

Running OS X 10.11 (El Capitain) + tmux + zsh

txgruppi@txgruppi-pro15:~/c/t/b/hello-world$ bit import bit.envs/compilers/babel --compiler --save
Error: Encrypted private key detected, but no passphrase given
    at Client.connect (/usr/local/Cellar/bit/0.5.0/libexec/node_modules/ssh2/lib/client.js:230:15)
    at /usr/local/Cellar/bit/0.5.0/libexec/dist/scope/network/ssh/ssh.js:258:14
    at SSH.connect (/usr/local/Cellar/bit/0.5.0/libexec/dist/scope/network/ssh/ssh.js:253:14)
    at connect (/usr/local/Cellar/bit/0.5.0/libexec/dist/scope/network/network-lib.js:36:96)
    at Remote.connect (/usr/local/Cellar/bit/0.5.0/libexec/dist/remotes/remote.js:66:56)
    at Remote.fetch (/usr/local/Cellar/bit/0.5.0/libexec/dist/remotes/remote.js:107:19)
    at /usr/local/Cellar/bit/0.5.0/libexec/dist/remotes/remotes.js:158:27
@itaymendel
Copy link
Contributor

Hi,

does Bit points to the correct SSH key? (open terminal and run bit config get ssh_key_file).
By default Bit will try to grab what it considers to be the default SSH key (~/.ssh/id_rsa). If you store your SSH key elsewhere, you can configure Bit to use it instead (bit config set ssh_key_file "new/ssh_key/location"). Sometimes, if Bit tries to use a non-exisiting SSH key can throw this exception.

If this workaround does not solve the problem, can you please provide the following information:

  1. which version of Bit do you have installed? (open terminal and run bit --version)?
  2. does your SSH key requires passphrase?

Cheers

@txgruppi
Copy link
Author

txgruppi commented Apr 5, 2017

Hi @itaymendel,

My SSH key requires a password and you can check the output for the commands below:

txgruppi@txgruppi-pro15:~/c/t/b/hello-world$ bit config get ssh_key_file
/Users/txgruppi/.ssh/id_rsa
txgruppi@txgruppi-pro15:~/c/t/b/hello-world$ file /Users/txgruppi/.ssh/id_rsa
/Users/txgruppi/.ssh/id_rsa: ASCII text
txgruppi@txgruppi-pro15:~/c/t/b/hello-world$ bit --version
0.5.0

Thanks

@itaymendel
Copy link
Contributor

thanks @txgruppi, right now Bit does not provide a prompt for entering passphrase for SSH keys.
we are working to resolve it (and provide better error messages instead of stacktraces from unhandled exceptions).

as a temporary workaround you can generate an SSH key without a passphrase, and point Bit to use it - until this issue is resolved.

I will keep you posted on any further development!

@itaymendel itaymendel assigned davidfirst and unassigned davidfirst Apr 6, 2017
@txgruppi
Copy link
Author

txgruppi commented Apr 6, 2017

Ok. Thanks @itaymendel.

@GiladShoham
Copy link
Member

update - passphrase and ssh-agent are now supported (since version 0.11.1).

davidfirst added a commit that referenced this issue Apr 27, 2020
* rename all files from .js to .ts

* configure babel to compile typescript

* fix all typescript syntax errors

* reconfigure eslint to work with typescript

* fix many lint errors

*  automatically add @ts-ignore for all tsc errors

* add lint and check_types scripts for the bit-bin CI to run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants