【问题标题】:Bower Install Uses git protocol even after changing the configurationBower Install 即使在更改配置后也使用 git 协议
【发布时间】:2014-10-28 21:35:28
【问题描述】:

我正在尝试使用 Bower 安装组件,并且我在公司的代理后面。最初我收到以下错误,

PS C:\App> bower instal
l jquery
bower not-cached    git://github.com/jquery/jquery.git#*
bower resolve       git://github.com/jquery/jquery.git#*
bower cached        https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angul
ar.min.js
bower validate      https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angul
ar.min.js#*
bower ECMDERR       Failed to execute "git ls-remote --tags --heads git://github
.com/jquery/jquery.git", exit code of #128

Additional error details:
fatal: unable to connect to github.com:

在四处寻找后,使用以下命令找到了使用 https: 协议而不是 git 的替代方案,

git config --global url.https://.insteadOf git://

在我列出配置后,

core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
url.https://.insteadof=git://

即使完成所有这些步骤,我仍然会再次收到上述错误。

知道我错过了什么吗?

拉杰

【问题讨论】:

  • 我在 windows 中搜索并找到了实际的文件位置并进行了更新。现在它起作用了。仍然想知道命令行编辑去了哪里

标签: git github bower bower-install


【解决方案1】:

我遇到了同样的问题,问题是我使用的是 Cygwin。 git config --global 正在将配置添加到我的 Cygwin 主页 (~/.gitconfig),但是当 bower 执行 git 时,它正在使用我的 Windows 主页 (C:\Users\name\.gitconfig) 上的配置。

~/.gitconfig 复制到C:\Users\name\.gitconfig 解决了这个问题。

【讨论】:

    猜你喜欢
    • 2020-10-20
    • 1970-01-01
    • 2016-03-29
    • 1970-01-01
    • 2021-06-30
    • 1970-01-01
    • 2013-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多