Vim-plug: Vim-plug cannot read repository in Cygwin installed vim

Created on 6 Jul 2017  路  2Comments  路  Source: junegunn/vim-plug


I have cygwin installed in windows, with the git and vim packages. I go to vim and add this to my vimrc:

call plug#begin('$HOME/.vim/plugged')`
Plug 'https://github.com/Townk/vim-autoclose'
call plug#end()
when I do

:PlugInstall
I get the following error:

Cloning into '$HOME/.vim/plugged/vim-autoclose'... (Instead of $HOME the actual directory was written)

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 18 2017 22:28:15)
Included patches: 1-647
Modified by <[email protected]>
Compiled by <[email protected]>
Huge version without GUI.  Features included (+) or not (-):
+acl             +cmdline_compl   +digraphs        +folding         +langmap         -mouseshape      -mzscheme        +python3/dyn     +syntax          -toolbar         +writebackup
+arabic          +cmdline_hist    -dnd             -footer          +libcall         +mouse_dec       +netbeans_intg   +quickfix        +tag_binary      +user_commands   -X11
+autocmd         +cmdline_info    -ebcdic          +fork()          +linebreak       -mouse_gpm       +num64           +reltime         +tag_old_static  +vertsplit       -xfontset
-balloon_eval    +comments        +emacs_tags      +gettext         +lispindent      -mouse_jsbterm   +packages        +rightleft       -tag_any_white   +virtualedit     -xim
-browse          +conceal         +eval            -hangul_input    +listcmds        +mouse_netterm   +path_extra      +ruby/dyn        -tcl             +visual          -xpm
++builtin_terms  +cryptv          +ex_extra        +iconv           +localmap        +mouse_sgr       +perl/dyn        +scrollbind      +termguicolors   +visualextra     -xsmp
+byte_offset     +cscope          +extra_search    +insert_expand   +lua/dyn         -mouse_sysmouse  +persistent_undo +signs           +terminfo        +viminfo         -xterm_clipboard
+channel         +cursorbind      +farsi           +job             +menu            +mouse_urxvt     +postscript      +smartindent     +termresponse    +vreplace        -xterm_save
+cindent         +cursorshape     +file_in_path    +jumplist        +mksession       +mouse_xterm     +printer         +startuptime     +textobjects     +wildignore
-clientserver    +dialog_con      +find_in_path    +keymap          +modify_fname    +multi_byte      +profile         +statusline      +timers          +wildmenu
+clipboard       +diff            +float           +lambda          +mouse           +multi_lang      +python/dyn      -sun_workshop    +title           +windows
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/vim/vim-8.0.0647-1.x86_64/build=/usr/src/debug/vim-8.0.064
7-1 -fdebug-prefix-map=/usr/src/ports/vim/vim-8.0.0647-1.x86_64/src/vim-8.0.0647=/usr/src/debug/vim-8.0.0647-1 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -fstack-protector  -fstack-protector-strong -L/usr/local/lib -Wl,--as-needed -o vim.exe        -lm -lelf    -lncursesw -liconv -lacl -lattr -lintl   -Wl,--enable-auto-import
 -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong  -L/usr/lib/perl5/5.22/x86_64-cygwin-threads/CORE -lperl -lpthread -ldl -lcrypt

  • Type:

    • [x] Bug

    • [ ] Enhancement

    • [ ] Feature Request

    • [ ] Question

  • OS:

    • [ ] All/Other

    • [ ] Linux

    • [ ] OS X

    • [x] Windows

  • Vim:

    • [x] Terminal Vim

    • [ ] GVim

    • [ ] Neovim

windows

Most helpful comment

Ok I figured it out. Earlier I had not added any SSH keys to git, so vim-plug failed the download. Then I searched the net and came across this command:

$   git config --global url."[email protected]:".insteadOf "https://github.com/"

I tried it, and it did something (I don't know what, I am knew to git), and then figured out somehow that I needed to add my SSH key to git. I did that, and when it didn't work I opened this issue.

Now recently I tried to edit my .gitconfig and saw this:

[url "[email protected]:"]
       insteadOf = https://github.com/

due to the command I had earlier written. I deleted these lines, saved it, and tried :PlugInstall and now it works! I wrote this so any other person having the same problem can solve this.

All 2 comments

Ok I figured it out. Earlier I had not added any SSH keys to git, so vim-plug failed the download. Then I searched the net and came across this command:

$   git config --global url."[email protected]:".insteadOf "https://github.com/"

I tried it, and it did something (I don't know what, I am knew to git), and then figured out somehow that I needed to add my SSH key to git. I did that, and when it didn't work I opened this issue.

Now recently I tried to edit my .gitconfig and saw this:

[url "[email protected]:"]
       insteadOf = https://github.com/

due to the command I had earlier written. I deleted these lines, saved it, and tried :PlugInstall and now it works! I wrote this so any other person having the same problem can solve this.

Thank you that worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bearzyj picture bearzyj  路  3Comments

xmudrii picture xmudrii  路  4Comments

178me picture 178me  路  3Comments

zQueal picture zQueal  路  4Comments

fvictorio picture fvictorio  路  3Comments