MarcWeber / vim-addon-manager

manage and install vim plugins (including their dependencies) in a sane way. If you have any trouble contact me. Usually I reply within 24 hours
Other
660 stars 59 forks source link

http Proxy issues #107

Closed Massimo-B closed 11 years ago

Massimo-B commented 11 years ago

I would appreciate to have more flexibility behind a proxy where I can't reach git:// sources.

So far I was using this hack only when I was using VAM 6 month ago:

let g:vim_addon_manager = {}
let g:vim_addon_manager['git_checkout'] = {'f': 'MyGitCheckout', 'a': []}
fun! MyGitCheckout(repository, targetDir)
    let a:repository.url = substitute(a:repository.url, '^git:\/\/github', 'http://github', '')
    call vam#utils#RunShell('git clone --depth=1 $.url $p', a:repository, a:targetDir)
endfun

But with my new installation this did not solve all connections, so I have seen this comment which I just changed like this:

" Example: drop git sources unless git is in PATH. Same plugins can
" be installed from www.vim.org. Lookup MergeSources to get more control
" let g:vim_addon_manager.drop_git_sources = !executable('git')
let g:vim_addon_manager.drop_git_sources = 1

With both changes I can fetch my addons. If this is the correct way to fetch http(s):// sources only I would like to see a comment there about Proxy users (although git binary is available, so this check is not sufficient). Maybe even falling back to http:// if git:// failed like Gentoo's layman does.

Best regards, Massimo

MarcWeber commented 11 years ago

Pick any of those repos, then tell us whether the http or https:// protocol (using git) works for you. If it does you can tell us whether the MyGitCheckout implementation is buggy for whatever reasons. You can do so by watching the command VAM prints (if you can't see it try the log to buf option). If there is git:// something went wrong. if there is git clone http:// everything is fine - but git clone http(s):// fails for you. I don't think its our task to care about all kinds of fallbacks. If git doesn't work you have to disable it manually because VAM has one principle: Always get the same result. If VAM fall back to non git sources behaviour might differ. I'm no longer sure. I think zyx has also implemented a way to fetch git sources as archive from github. I don't have time to look it up at the moment. Should be easy to find.

Last but not least you can get everything using http://vam.mawercer.de/ and be done.

Massimo-B commented 11 years ago

A git clone http(s):// works fine in my environment.

I missed the Notes and example for MyGitCheckout in the docs. My old version was different, the url substitute is working now. Thanks.