git - 无法查找 git(不支持 servname)

标签 git vim

运行 centos 7,vim Plug Installer ,我遇到了 git 的克隆问题:

:PlugInstall
  1 Updated. Elapsed time: 1.226362 sec.
  2 [===x==x===xx===x=xx=x===x=x=xxxxxx=xx]
  3
  4 - Finishing ... Done!
  5 - vim-slim: Already installed
  6 - vim-github-dashboard: Already installed
  7 - monokai: Already installed
  8 - fzf: Already installed
  9 - vim-json: Already installed
 10 - gocode: Already installed
 11 x delimitMate
 12     fatal: Unable to look up git (port :@github.com) (Servname not supported for ai_socktype)
 13     Cloning into '/root/.vim/plugged/delimitMate'...

git clone git@github.com:Raimondi/delimitMate.git 工作正常,https 端点也是如此 -

怀疑 dns,使用 nslookup 返回以下内容:

› nslookup github.com
Server:     8.8.8.8
Address:    8.8.8.8#53

Non-authoritative answer:
Name:   github.com
Address: 192.30.252.130

为什么插件库无法解析?

最佳答案

git clone git@github.com:Raimondi/delimitMate.git works just fine

在终端中,但不使用 Plug。根据Plug FAQ你应该使用 https URL,或者,如果你坚持使用 SSH URL,请将 g:plug_url_format 设置为 git@github.com:% s.git.

关于git - 无法查找 git(不支持 servname),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31226281/

相关文章:

linux - 我应该使用 git add before 还是 git commit before

vim - 如何在 Vim 中用 '&=' 替换 '=&'?

git - Vim:如果在 Git 中未跟踪文件,则发出警告

c# - 从 git 中提取项目后,Unity 无法识别某些 .cs 文件

Windows 上的 GIT Hook 与批处理

Gitignore 不工作

vim - 无法让我的 <Insert> 键重新映射

html - 从命令行验证 HTML

vim - 从 vim 命令行回显函数调用

git - 如何将包含还原提交的主 merge 到分支