From ef17e287e15881f3e1ff3ef658b716fd0c3eaf4f Mon Sep 17 00:00:00 2001 From: Chaos John Date: Sat, 16 Apr 2022 00:13:08 +0800 Subject: [PATCH] fix: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. Change protocal to ssh if g:vundle_default_git_proto = 'git' --- autoload/vundle/config.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 0e02b11..c665d4d 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -138,10 +138,11 @@ endf func! s:parse_name(arg) let arg = a:arg let git_proto = exists('g:vundle_default_git_proto') ? g:vundle_default_git_proto : 'https' + let git_host = git_proto == 'git' ? '@github.com:' : '://github.com/' if arg =~? '^\s*\(gh\|github\):\S\+' \ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$' - let uri = git_proto.'://github.com/'.split(arg, ':')[-1] + let uri = git_proto.git_host.split(arg, ':')[-1] if uri !~? '\.git$' let uri .= '.git' endif @@ -153,7 +154,7 @@ func! s:parse_name(arg) let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] else let name = arg - let uri = git_proto.'://github.com/vim-scripts/'.name.'.git' + let uri = git_proto.git_host.'vim-scripts/'.name.'.git' endif return {'name': name, 'uri': uri, 'name_spec': arg } endf