ycmd第三方包golang.org/x/tools解决方案
高小猿 · · 2218 次点击 · · 开始浏览vim安装YouCompleteMe插件时 , 碰到以下报错:
[gaoqilin@gqlmac /Users/gaoqilin/.vim/bundle/YouCompleteMe]$ git submodule update --init --recursive
Cloning into '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools'...
fatal: unable to access 'https://go.googlesource.com/tools/': Failed to connect to go.googlesource.com port 443: Operation timed out
fatal: clone of 'https://go.googlesource.com/tools' into submodule path '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools' failed
Failed to clone 'third_party/go/src/golang.org/x/tools'. Retry scheduled
Cloning into '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools'...
解决方案 :
从github下载golang.org/x/tools https://github.com/golang/tools
第一步: 先替换.git/config文件`
vim ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.git/config
找到[submodule "third_party/go/src/golang.org/x/tools"] 替换为以下内容
[submodule "third_party/go/src/golang.org/x/tools"]
active = true
url = https://github.com/relunctance/tools.git
第二步: 替换.gitmodules文件
vim ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.gitmodules
找到[submodule "third_party/go/src/golang.org/x/tools"] 替换为以下内容
[submodule "third_party/go/src/golang.org/x/tools"]
path = third_party/go/src/golang.org/x/tools
url = https://github.com/relunctance/tools.git
ignore = dirty
第三步
cd ~/.vim/bundle/YouCompleteMe/third_party/ycmd
git submodule update --init --recursive
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
关注微信- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码` - 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传
收入到我管理的专栏 新建专栏
vim安装YouCompleteMe插件时 , 碰到以下报错:
[gaoqilin@gqlmac /Users/gaoqilin/.vim/bundle/YouCompleteMe]$ git submodule update --init --recursive
Cloning into '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools'...
fatal: unable to access 'https://go.googlesource.com/tools/': Failed to connect to go.googlesource.com port 443: Operation timed out
fatal: clone of 'https://go.googlesource.com/tools' into submodule path '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools' failed
Failed to clone 'third_party/go/src/golang.org/x/tools'. Retry scheduled
Cloning into '/Users/gaoqilin/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools'...
解决方案 :
从github下载golang.org/x/tools https://github.com/golang/tools
第一步: 先替换.git/config文件`
vim ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.git/config
找到[submodule "third_party/go/src/golang.org/x/tools"] 替换为以下内容
[submodule "third_party/go/src/golang.org/x/tools"]
active = true
url = https://github.com/relunctance/tools.git
第二步: 替换.gitmodules文件
vim ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.gitmodules
找到[submodule "third_party/go/src/golang.org/x/tools"] 替换为以下内容
[submodule "third_party/go/src/golang.org/x/tools"]
path = third_party/go/src/golang.org/x/tools
url = https://github.com/relunctance/tools.git
ignore = dirty
第三步
cd ~/.vim/bundle/YouCompleteMe/third_party/ycmd
git submodule update --init --recursive