Git 使用 Vundle 安装时出错
Git error when installing with Vundle
我最近在 OS X 10.11.5 上安装并一直在使用 MacVim,我想安装一些插件。我成功安装了 Vundle,但是当我尝试使用 Vundle 安装插件时遇到错误。我要安装的插件是 YouCompleteMe。我所做的是键入 :PluginInstall YouCompleteMe
,但是,当我执行此操作时,出现以下错误:
"fatal: could not read Username for 'https://github.com': Device not configured"
我是st运行ge;我有一个 GitHub 帐户,但我没有因此而获得晋升。我是 git 的新手,如有任何帮助,我们将不胜感激!
这是 error log.
的屏幕截图
更新:
我 运行 从命令提示符克隆,它工作,但我希望能够从 MacVim 内部管理它。此外,URL MacVim 使用的是错误的。我不得不去页面本身并获得一个不同的 URL。如果可能的话,我想在 MacVim 中自动执行此操作。即使使用 SSH 而不是 HTTPS 也不能解决不正确的 URL 问题。
要使用 ssh 而不是 https:
git config --global url."git@github.com:".insteadOf https://github.com/
然后再次尝试插件安装:任何 https://github.com 访问现在都应该使用 ssh url。
同样:
git config --global url."https://github.com/vim-scripts/YouCompleteMe.git".insteadOf "https://github.com/Valloric/YouCompleteMe.git"
那会 "automate this inside MacVim"。
如果你的本地仓库有错误 url:
cd /path/to/local/repo
git remote set-url origin https://github.com/Valloric/YouCompleteMe.git
我最近在 OS X 10.11.5 上安装并一直在使用 MacVim,我想安装一些插件。我成功安装了 Vundle,但是当我尝试使用 Vundle 安装插件时遇到错误。我要安装的插件是 YouCompleteMe。我所做的是键入 :PluginInstall YouCompleteMe
,但是,当我执行此操作时,出现以下错误:
"fatal: could not read Username for 'https://github.com': Device not configured"
我是st运行ge;我有一个 GitHub 帐户,但我没有因此而获得晋升。我是 git 的新手,如有任何帮助,我们将不胜感激!
这是 error log.
的屏幕截图更新:
我 运行 从命令提示符克隆,它工作,但我希望能够从 MacVim 内部管理它。此外,URL MacVim 使用的是错误的。我不得不去页面本身并获得一个不同的 URL。如果可能的话,我想在 MacVim 中自动执行此操作。即使使用 SSH 而不是 HTTPS 也不能解决不正确的 URL 问题。
要使用 ssh 而不是 https:
git config --global url."git@github.com:".insteadOf https://github.com/
然后再次尝试插件安装:任何 https://github.com 访问现在都应该使用 ssh url。
同样:
git config --global url."https://github.com/vim-scripts/YouCompleteMe.git".insteadOf "https://github.com/Valloric/YouCompleteMe.git"
那会 "automate this inside MacVim"。
如果你的本地仓库有错误 url:
cd /path/to/local/repo
git remote set-url origin https://github.com/Valloric/YouCompleteMe.git