简体   繁体   English

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

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

I try to install angularJs ( https://docs.angularjs.org/tutorial ) When i do npm install some package can't install and i got error 我尝试安装angularJs( https://docs.angularjs.org/tutorial )当我执行npm install某些软件包无法安装并且出现错误

I don't handle protocol '[https' 我不处理协议“ [https”

I tried to write : 我试图写:

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

into .bowerrc and the command git config --global url."https://".insteadOf git:// but not working neither 进入.bowerrc和命令git config --global url."https://".insteadOf git://但都不起作用

If i install manually the package with git clone , some packages pass, some won't and still saying 如果我使用git clone手动安装该软件包,则某些软件包可以通过,有些则不会,仍然会说

I don't handle protocol '[https' 我不处理协议“ [https”

I don't handle protocol '[https' 我不处理协议“ [https”

full error : 完全错误:

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' bower ECMDERR无法执行“ git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git”,退出代码#128致命:我不处理协议'[ https'

i'm on kubuntu 我在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

I finally found a way to make it work : 我终于找到了使之工作的方法:

git: convert "git" urls to "http" urls git:将“ git”网址转换为“ http”网址

Here's an example of rewriting the default protocol for GitHub: git config --global url.https://github.com/.insteadOf git://github.com/ 这是重写GitHub默认协议的示例: git config --global url.https://github.com/.insteadOf git://github.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM