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

Checks wrong user for an SSH passphrase #26

Open
qris opened this issue Feb 27, 2014 · 1 comment
Open

Checks wrong user for an SSH passphrase #26

qris opened this issue Feb 27, 2014 · 1 comment
Labels
Milestone

Comments

@qris
Copy link
Collaborator

qris commented Feb 27, 2014

I'm in Daniel's session and trying to deploy. Daniel has an SSH key with a passphrase, so I try to tell fab.py to use my own username instead:

daniell@fen-desktop7:~/git/ruforum/django/website$ ../../deploy/fab.py -u chris staging deploy 

But it still asks me for a passphrase:

[fen-vz-ruforum-stage.fen.aptivate.org] Executing task 'deploy'
[fen-vz-ruforum-stage.fen.aptivate.org] Passphrase for private key: 

And I have to press Ctrl+C at this prompt to skip it, then it asks for my login password as it should:

[fen-vz-ruforum-stage.fen.aptivate.org] Login password: 

This may be a Fabric bug? It happens here:

Sorry, you can't enter an empty password. Please try again.
[fen-vz-ruforum-stage.fen.aptivate.org] Passphrase for private key: Traceback (most recent call last):
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/main.py", line 710, in main
    *args, **kwargs
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/tasks.py", line 292, in execute
    multiprocessing
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/tasks.py", line 191, in _execute
    return task.run(*args, **kwargs)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/tasks.py", line 113, in run
    return self.wrapped(*args, **kwargs)
  File "../../deploy/localfab.py", line 41, in deploy
    fablib.deploy(revision=revision, keep=keep)
  File "/home/daniell/git/ruforum/django/website/.ve/src/dye/dye/fablib.py", line 152, in deploy
    _create_dir_if_not_exists(env.server_project_home)
  File "/home/daniell/git/ruforum/django/website/.ve/src/dye/dye/fablib.py", line 134, in _create_dir_if_not_exists
    if not files.exists(path):
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/contrib/files.py", line 35, in exists
    return not func(cmd).failed
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/network.py", line 457, in host_prompting_wrap
per
    return func(*args, **kwargs)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/operations.py", line 904, in run
    return _run_command(command, shell, pty, combine_stderr)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/operations.py", line 814, in _run_command
    stdout, stderr, status = _execute(default_channel(), wrapped_command, pty,
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/state.py", line 340, in default_channel
    chan = connections[env.host_string].get_transport().open_session()
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/network.py", line 84, in __getitem__
    self.connect(key)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/network.py", line 76, in connect
    self[key] = connect(user, host, port)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/network.py", line 351, in connect
    password = prompt_for_password(text)
  File "/home/daniell/git/ruforum/django/website/.ve/lib/python2.6/site-packages/fabric/network.py", line 427, in prompt_for_password
    new_password = getpass.getpass(password_prompt, stream)
  File "/usr/lib/python2.6/getpass.py", line 71, in unix_getpass
    passwd = _raw_input(prompt, stream, input=input)
  File "/usr/lib/python2.6/getpass.py", line 135, in _raw_input
    raise EOFError
@foobacca
Copy link
Collaborator

foobacca commented Mar 5, 2014

I think this is a fabric bug that I've been seeing since before we moved the deploy scripts into dye - I've tended to get around this by typing a few keys at the passphrase prompt and pressing enter. It then asks me for the login password and I can carry on. Alternatively I've run ssh-add and then it just asks me for the sudo password.

I agree it's not ideal though. I'll try and find time to work out if newer versions of fabric have this bug or not.

@decentral1se decentral1se added this to the P3: Optional milestone Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants