From e5c5314baee531a0acff36bfbc074de02aab7fcc Mon Sep 17 00:00:00 2001 From: David Lowry-Duda Date: Mon, 29 Jan 2018 07:22:30 +0000 Subject: [PATCH] Set GIT_ASKPASS environment variable before clone Right now, if you has a mistyped github repo in your vimrc and you run :PluginInstall, then vundle hangs and asks for your github username and password. This is caused because git wants to check to make sure the error isn't caused by some permissions problem. In #662 and #667, it was noted that we could fix this by setting the GIT_ASKPASS environment variable. In this commit, I set this environment variable for the git clone commands. Note: resolves #667 --- autoload/vundle/installer.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 472271a..09eb39d 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -415,7 +415,7 @@ func! s:make_sync_command(bang, bundle) abort let initial_sha = s:get_current_sha(a:bundle) else - let cmd = 'git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) + let cmd = 'GIT_ASKPASS="true" git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) let initial_sha = '' endif return [cmd, initial_sha]