git:我不处理协议“[https”

git: I don't handle protocol '[https'

我尝试安装 angularJs (https://docs.angularjs.org/tutorial) 当我执行 npm install 某些软件包无法安装并且出现错误

I don't handle protocol '[https'

我试着写:

{ "proxy" : "http://<host>:<port>", "https-proxy" : "http://<host>:<port>" }

进入 .bowerrc 和命令 git config --global url."https://".insteadOf git:// 但都不起作用

如果我用 git clone 手动安装包,有些包会通过,有些不会,但仍然说

I don't handle protocol '[https'

我不处理协议“[https”

完全错误:

bower ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git", exit code of #128 fatal: I don't handle protocol '[https'

我在用 kubuntu

npm config get

; cli configs
registry = "https://registry.npmjs.org/"

; builtin config undefined
# DO NOT MODIFY THIS FILE - use /etc/npmrc instead. = true
globalconfig = "/etc/npmrc"
globalignorefile = "/etc/npmignore"
prefix = "/usr/local"

; node bin location = /usr/bin/nodejs
; cwd = /home/marvin/angular-phonecat
; HOME = /home/marvin
; 'npm config ls -l' to show all defaults.

npm config ls -l

; cli configs
long = true
registry = "https://registry.npmjs.org/"

; builtin config undefined
# DO NOT MODIFY THIS FILE - use /etc/npmrc instead. = true
globalconfig = "/etc/npmrc"
globalignorefile = "/etc/npmignore"
prefix = "/usr/local"

; default values
always-auth = false
bin-links = true
browser = null
cache = "/home/marvin/.npm"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
color = true
coverage = false
depth = null
description = true
dev = false
editor = "vi"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
global = false
; globalconfig = "/usr/local/etc/npmrc" (overridden)
; globalignorefile = "/usr/local/etc/npmignore" (overridden)
group = 1000
https-proxy = null
ignore = ""
init-module = "/home/marvin/.npm-init.js"
init.author.email = ""
init.author.name = ""
init.author.url = ""
init.version = "0.0.0"
json = false
link = false
loglevel = "http"
; long = false (overridden)
message = "%s"
node-version = "v0.10.25"
npat = false
npaturl = "http://npat.npmjs.org/"
onload-script = false
optional = true
parseable = false
pre = false
; prefix = "/usr" (overridden)
production = false
proprietary-attribs = true
proxy = null
rebuild-bundle = true
registry = "https://registry.npmjs.org/"
rollback = true
save = false
save-bundle = false
save-dev = false
save-optional = false
searchexclude = null
searchopts = ""
searchsort = "name"
shell = "/bin/bash"
shrinkwrap = true
sign-git-tag = false
strict-ssl = true
tag = "latest"
tmp = "/home/marvin/tmp"
umask = 18
unicode = true
unsafe-perm = true
usage = false
user = 0
user-agent = "node/v0.10.25 linux x64"
userconfig = "/home/marvin/.npmrc"
userignorefile = "/home/marvin/.npmignore"
username = ""
version = false
versions = false
viewer = "man"
yes = null

我终于找到了让它工作的方法:

Here's an example of rewriting the default protocol for GitHub: git config --global url.https://github.com/.insteadOf git://github.com/