Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistyping a plugin name gives a cryptic error #1273

Open
4 of 11 tasks
adamyakes opened this issue Mar 6, 2024 · 2 comments
Open
4 of 11 tasks

Mistyping a plugin name gives a cryptic error #1273

adamyakes opened this issue Mar 6, 2024 · 2 comments

Comments

@adamyakes
Copy link

adamyakes commented Mar 6, 2024

I recently mistyped the name of a repo/plugin, and when I ran :PlugInstall, I ran into the same cryptic error described in this Stack Overflow issue.

Cloning into 'C:\Users\myusername\AppData\Local\nvim-data\plugged\coc.vim'...
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/neoclide/coc.vim.git/'

Here's my init.lua:

local vim = vim
local Plug = vim.fn['plug#']

vim.call('plug#begin')

Plug('neoclide/coc.vim', { ['branch'] = 'release'})

vim.call('plug#end')

Note, it's supposed to be neoclide/coc.nvim. What's confusing to me is that if I run a regular git clone on with that URL, I get a much more helpful error message:

$ git clone https://github.com/neoclide/coc.vim
Cloning into 'coc.vim'...
remote: Repository not found.
fatal: repository 'https://github.com/neoclide/coc.vim/' not found

Whatever vim-plug does to fetch that repository is producing this different error message. It would be great if vim-plug would either produce the default repository not found error, or otherwise detect the scenario of a plugin not found and report as such.

  • Type:
    • Bug
    • Enhancement
    • Feature Request
    • Question
  • OS:
    • All/Other
    • Linux
    • macOS
    • Windows
  • Vim:
    • Terminal Vim
    • GVim
    • Neovim
@junegunn
Copy link
Owner

junegunn commented Mar 6, 2024

See my previous answer on that matter: #465

$ git clone https://github.com/neoclide/coc.vim
Cloning into 'coc.vim'...
remote: Repository not found.
fatal: repository 'https://github.com/neoclide/coc.vim/' not found

Interesting. I'm prompted for authentication information when I do it.

$ git clone https://github.com/neoclide/coc.vim
Cloning into 'coc.vim'...
Username for 'https://github.com': ^C

Unless I set GIT_TERMINAL_PROMPT to 0. It's what vim-plug does to avoid the prompt.

$ GIT_TERMINAL_PROMPT=0 git clone https://github.com/neoclide/coc.vim
Cloning into 'coc.vim'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
$

@junegunn
Copy link
Owner

junegunn commented Mar 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants