Skip to content
New issue

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

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

Already on GitHub? # to your account

Installing nonexistent plugin freezes pane and makes session unusable #7

Closed
yggdr opened this issue Sep 4, 2014 · 8 comments
Closed

Comments

@yggdr
Copy link

yggdr commented Sep 4, 2014

When installing a non-existent plug-in, like one having been misspelled in the config file, tpm just hangs on that plugin when installing. The tmux session becomes useless and has to be killed.

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

This is definitely not the desired behavior.

I tried reproducing the issue but I got a " download fail" message, not a complete freeze
screen shot 2014-09-04 at 1 44 00 pm

Can you please link me your .tmux.conf and type the exact name of the non-existent plugin that failed? Thanks

@yggdr
Copy link
Author

yggdr commented Sep 4, 2014

This is my .tmux.conf. If I misspell resurrect as ressurect, it just hangs at "Installing tmux-ressurect" for all eternity it seems. When I quit it, the session becomes useless, since no commands work anymore.

set-option -g mode-mouse on
set-window-option -g mode-keys vi
bind Escape copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
set -g utf8 on
set -g status-utf8 on

set-option -g prefix C-_
unbind-key C-b
bind-key C-_ send-prefix

unbind %
bind | split-window -h
bind - split-window -v

set -s escape-time 0

set -g display-time 4000

set-option -g status-keys vi
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-utf8 on
set-option -g default-terminal "screen-256color"
set-window-option -g xterm-keys on
set-option -g history-limit 100000
unbind-key k
unbind-key j
unbind-key h
unbind-key l
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R

source ~/local/lib/powerline/powerline/bindings/tmux/powerline.conf

COLOUR (Solarized dark)

default statusbar colors

#set-option -g status-bg black #base02
#set-option -g status-fg yellow #yellow
#set-option -g status-attr default

default window title colors

#set-window-option -g window-status-fg brightblue #base0
#set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim

active window title colors

#set-window-option -g window-status-current-fg brightred #orange
#set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright

pane border

set-option -g pane-border-fg red #base02
set-option -g pane-active-border-fg brightgreen #base01
set-option -g pane-active-border-bg brightgreen #base01

message text

#set-option -g message-bg black #base02
#set-option -g message-fg brightred #orange

pane number display

#set-option -g display-panes-active-colour blue #blue
#set-option -g display-panes-colour brightred #orange

clock

#set-window-option -g clock-mode-colour green #green

List of plugins

Supports github_username/repo or full git URLs

set -g @tpm_plugins "
tmux-plugins/tpm
tmux-plugins/tmux-open
tmux-plugins/tmux-yank
tmux-plugins/tmux-copycat
tmux-plugins/tmux-resurrect
tmux-plugins/tmux-sessionist
tmux-plugins/tmux-example-plugin
"

Other examples:

github_username/plugin_name \

git@github.com/user/plugin \

git@bitbucket.com/user/plugin \

initializes TMUX plugin manager

run-shell ~/.tmux/plugins/tpm/tpm

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

Hi,
thanks for the feedback. Your tmux.conf looks fine..

I was able to reproduce something similar in the meantime. When plugins are installed manually by invoking the script behind prefix + I key binding:

# just for testing, not a "public" interface for installing plugins
~/.tmux/plugins/tpm/scripts/install_plugins.sh

Now, when there's a non-existing plugin, the installation just hangs.
After hitting some random keyboard keys it was revealed that script was waiting for github credentials in the background:

Username for 'https://github.com':
Password for 'https://github.com':

I was able to go through that by just hitting enter and the process resumed. I didn't get an unusable session afterwards though.

Will try to fix the above an investigate more.

@yggdr
Copy link
Author

yggdr commented Sep 4, 2014

Yes, I see the same thing here. Apparently when invoked with prefix + I, I can't get around the credentials prompt. Hitting enter kills the script and leaves me with unloaded keybindings.

@bruno-
Copy link
Member

bruno- commented Sep 4, 2014

Ok, thanks for the confirmation.
The solution to this might be to just provide dummy github credentials so that unsuccessful git clone fails fast.

Example: the plugin "example/plugin" will be cloned from https://github.com/example/plugin and we expect it to fail. We just don't want the username/pass prompt.

By adding the foo:bar dummy username/pass like this https://foo:bar@github.com/example/plugin it will fail fast, but still work for a valid repo.

Even though this seems to work I'm not sure about actually pushing this now. It would be much better if we can find a git config option to control this cleanly.
Also github might be concerned about the user "foo" cloning repositories all too often 😃

@bruno- bruno- closed this as completed in f746ae2 Nov 21, 2014
@bruno-
Copy link
Member

bruno- commented Nov 21, 2014

Hey, this should now be fixed!
It turns out this issue occurs often with old git versions (ie ~1.7).

In the end, the solution seems to be to specify dummy username/password like this: https://git::@github.com/example/plugin.
There, git is the username and : is dummy password.

vim-plug seems to be running successfully with this solution for the past couple months. The detailed explanation is in this issue.

@bruno-
Copy link
Member

bruno- commented Nov 21, 2014

Btw. if you get a chance, please let me know how this works for you. Thanks!

@yggdr
Copy link
Author

yggdr commented Nov 26, 2014

It seems to work for me :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants