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

Tramp: Waiting for prompts from remote shell... Sending command `exec ssh -e none bin' #5326

Closed
incandescentman opened this issue Mar 2, 2016 · 3 comments

Comments

@incandescentman
Copy link

My Spacemacs hangs for several minutes every time I launch Emacs, giving me these Tramp errors:

Tramp: Opening connection for bin using scp...
Tramp: Sending command `exec ssh  -e none bin'
Tramp: Waiting for prompts from remote shell...
Timeout reached, see buffer `*tramp/scp bin*' for details
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for bin using scp...failed

My tramp debug:
https://gist.github.com/2dc7672fb5aa22f06b53

I believe it's related to this:
emacs-helm/helm#1000

and this:
#3422 (comment)

I followed the directions from the Spacemacs FAQ, which suggests this solution:

(setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='tramp.%%C' -o ControlPersist=no")

This didn't have any effect.

I also tried this:

(setq tramp-ssh-controlmaster-options nil)

...but I got the same result.

The FAQ suggests that if the above doesn't work, you can try to put these settings directly in ~/.ssh/config:

Host *  
ControlMaster auto  
ControlPath ~/.ssh/master -%r@%h:%p  
ControlPersist = no `  

So I did this, which caused the error message to change to this:

Tramp failed to connect.
Garbage at the end of the line. -%r@%h:%p  
If this happens repeatedly, try M-x tramp-cleanup-this-connection

I did also try tramp-cleanup-this-connection also, but it too had no effect.

How can I get Spacemacs to stop hanging on startup?

@incandescentman incandescentman changed the title Tramp errors on startup with even after following the instructions in the FAQ Tramp errors on startup even after following the instructions in the FAQ Mar 2, 2016
@incandescentman
Copy link
Author

This took me 5 days to figure out.

The message Sending command 'exec ssh -e none bin' is a clue that an error is occurring when exec-path-from-shell reads the path from the shell environment.

Once I figured this out, I checked my .bashrc and found the offending line:

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

Killing this line solved the Emacs launch problem.

@incandescentman incandescentman changed the title Tramp errors on startup even after following the instructions in the FAQ Tramp: Waiting for prompts from remote shell... Sending command `exec ssh -e none bin' Mar 7, 2016
@vellamike
Copy link

@incandescentman I don't understand why this works? why would that export make a difference?

@romario89
Copy link

It might have something to do with ruby command line tools.

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