2

I'm using a plugin manager Vim Plug and I'm trying to install YouCompleteMe but I keep on getting this error and I don't know what to do with this. I use VIm8

x YouCompleteMe:
    Cloning into '/home/adib/.vim/plugged/YouCompleteMe'...
    
    
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.

adib@adib-Inspiron-15-3552:~$ ls -ld ~/.vim/plugged
drwxr-xr-x 8 adib adib 4096 Aug 13 21:51 /home/adib/.vim/plugged
adib@adib-Inspiron-15-3552:~$ cd  /home/adib/.vim/plugged
adib@adib-Inspiron-15-3552:~/.vim/plugged$ ls
gruvbox  typescript-vim  undotree  vim-fugitive  vim-man  vim-rtags
adib@adib-Inspiron-15-3552:~/.vim/plugged$ cd
adib@adib-Inspiron-15-3552:~$ find ~/.vim ! -user adib -ls
adib@adib-Inspiron-15-3552:~$ 

some of ~/.vimrc file

call plug#begin('~/.vim/plugged')

Plug 'scrooloose/nerdtree'
Plug 'morhetz/gruvbox'
Plug 'jremmen/vimripgrep'
Plug 'tpope/vim-fugitive'
Plug 'leafgarland/typescript-vim'
Plug 'vim-utils/vim-man'
Plug 'lyuts/vim-rtags'
Plug 'mbbill/undotree'
Plug 'Adib234/ctrlp.vim'
Plug 'Valloric/YouCompleteMe'
call plug#end()

Full log of error

[======xxxx]

- Finishing ... Done!
x vimripgrep:
    Cloning into '/home/adib/.vim/plugged/vimripgrep'...
    fatal: 'git@github.comjremmen/vimripgrep.git' does not appear to be a git repository
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
- vim-fugitive: Already installed
x ctrlp.vim:
    Cloning into '/home/adib/.vim/plugged/ctrlp.vim'...
    fatal: 'git@github.comAdib234/ctrlp.vim.git' does not appear to be a git repository
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
x YouCompleteMe:
    Cloning into '/home/adib/.vim/plugged/YouCompleteMe'...
    fatal: 'git@github.comValloric/YouCompleteMe.git' does not appear to be a git repository
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
- vim-man: Already installed
- vim-rtags: Already installed
x nerdtree:
    Cloning into '/home/adib/.vim/plugged/nerdtree'...
    fatal: 'git@github.comscrooloose/nerdtree.git' does not appear to be a git repository
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
- typescript-vim: Already installed
- gruvbox: Already installed
- undotree: Already installed

2
  • 1
    Welcome to Vi and Vim! Can you check whether the directories have the correct permissions? Try ls -ld ~/.vim, then ls -ld ~/.vim/plugged, and so on for all directories in the path. Also interesting is find ~/.vim ! -user adib -ls. Please edit the question to post the answers to these follow up questions.
    – filbranden
    Aug 14 '20 at 2:19
  • Questions answered Aug 14 '20 at 2:46
1

The mistake in my case was that in my ~/.gitconfig file, instead of having Git clone through https it would rewrite all clone request to ssh. I simply commented out the following lines to allow Git to clone through https again and to prevent it from rewriting.

#[url "ssh://git@github.com/"]
#  insteadOf = https://github.com/
#[url "ssh://git@gitlab.com/"]
#  insteadOf = https://gitlab.com/
#[url "ssh://git@bitbucket.org/"]
#  insteadOf = https://bitbucket.org/

For more information on this please read the following.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.