tpm icon indicating copy to clipboard operation
tpm copied to clipboard

Can't download behind proxy

Open mrt181 opened this issue 9 years ago • 8 comments

Hi, this is my setup

> ~ uname
CYGWIN_NT-6.1
> ~ cygcheck -V
cygcheck (cygwin) 2.5.1
System Checker for Cygwin
Copyright (C) 1998 - 2016 Red Hat, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ~ tmux -V
tmux 2.2
> ~ $SHELL --version
zsh 5.1.1 (x86_64-unknown-cygwin)
> ~ 

this is from my .zshrc

if [[ "$(expr substr $(uname -s) 1 6)" == "CYGWIN" ]] || [[ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]]; then
  proxy=proxy.evilcorp.com:8080
  export http_proxy=http://$proxy
  export https_proxy=https://$proxy
fi

This is my .tmux.conf

# TPM
# list of plugins
set -g @shell_mode 'vi'
set -g @plugin '.tmux/plugins/tpm'
set -g @plugin '.tmux/plugins/tmux-open'
set -g @plugin '.tmux/plugins/tmux-resurrect'
set -g @plugin '.tmux/plugins/tmux-continuum'

if "test ! -d ~/.tmux/plugins/tpm" \
   "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
run '~/.tmux/plugins/tpm/tpm'

When I execute

prefix + I

I get this output

Already installed "tpm"                                                                                                                                                 [0/0]
Installing "tmux-open"
  "tmux-open" download fail
Installing "tmux-resurrect"
  "tmux-resurrect" download fail
Installing "tmux-continuum"
  "tmux-continuum" download fail

TMUX environment reloaded.

Done, press ENTER to continue.

mrt181 avatar May 02 '16 11:05 mrt181

do you tried make wget with this config?

ghost avatar Jul 02 '16 11:07 ghost

yes, wget and curl both work. I have updated the .zshrc part. I no longer need to authenticate to the proxy, I was white-listed by our network guys. prefix + I still does not work, that is i get the same output with download fail

mrt181 avatar Aug 08 '16 07:08 mrt181

Hmm.. so what happens if you just clone a random git repository from github via the command line?

For example, if you run this command in a temporary dir, what happens?

git clone https://github.com/tmux-plugins/tmux-example-plugin.git some_random_dir

In essence, this project uses a command like this to fetch plugins. If the above command is working, tpm should work too.

bruno- avatar Aug 21 '16 05:08 bruno-

hi, this command and all other git clone commands work without any problem. Can I run the install command with an verbose option or does it log verbose output somewhere?

mrt181 avatar Aug 22 '16 06:08 mrt181

also having this issue with tmux 2.3

am able to git clone, wget, and so on. using a vimplugin manager works for me too. any update on being able to run the command with a verbose option?

cole-brokamp avatar Mar 10 '17 20:03 cole-brokamp

Similar behavior might be experienced if the repo hosting the plugin does not support --recursive, e.g. a "dumb" git mirror.

https://github.com/tmux-plugins/tpm/blob/95f78336c3972f3e6648b7b3db754f2224320a5e/scripts/install_plugins.sh#L18

It's pretty easy to workaround, but would be nice if there was a set -g @tpm-recursive off or something (where default was 'on'). I might look into creating a PR later if I can make something work.

Edit: Started looking into a possible solution that enables arbitrary git clone options, where --recursive would be default. Little experience with writing tmux scripts/plugins, but WIP and hopefully I'll make something work later.

https://github.com/timss/tpm/tree/non-recursive

timss avatar Sep 05 '17 09:09 timss

Try to add your http_proxy and https_proxy into /etc/environment and reboot to try again, this method works to me.

saqwed avatar Oct 04 '22 01:10 saqwed

Any one know where to add http_proxy and https_proxy in MacOS? ~/.zshrc not work for me

thanch2n avatar May 11 '23 07:05 thanch2n