我尝试安装angularJs(https://docs.angularjs.org/tutorial)
当我执行npm install
时,某些软件包无法安装并且出现错误
我不会处理协议' [https'
我试着写:
{
"proxy" : "http://<host>:<port>",
"https-proxy" : "http://<host>:<port>"
}
进入.bowerrc
和命令git config --global url."https://".insteadOf git://
但不能正常工作
如果我使用git clone
手动安装软件包,有些软件包会通过,有些软件包会赢,但仍然会说
我不会处理协议&#39; [https&#39;
我不会处理协议&#39; [https&#39;
完整错误:
bower ECMDERR无法执行&#34; git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git" ;,退出代码#128致命:我不会处理协议&#39; [https&#39;
我在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
答案 0 :(得分:2)
我终于找到了让它发挥作用的方法:
git: convert "git" urls to "http" urls
以下是重写GitHub默认协议的示例:
git config --global url.https://github.com/.insteadOf git://github.com/