【发布时间】:2015-04-18 00:08:56
【问题描述】:
我正在尝试为 atom 安装 autocomplete-clang 插件。不幸的是,我公司的防火墙阻止了 git:// 协议使用的 9418 端口。
我能够安装使用 https:// URL 克隆 git repos 和依赖项的插件,但是当我尝试安装 autocomplete-clang 时,我收到以下错误:
npm WARN `git config --get remote.origin.url` 返回错误结果 (git://github.com/Kev/clang-flags.git) https://github.com/Kev/clang-flags .git npm 错误! git clone git://github.com/Kev/clang-flags.git 克隆到裸存储库 '~/.atom/.apm/_git-remotes/git-github-com-Kev-clang-flags-git-1a523481' ... npm 错误! git clone git://github.com/Kev/clang-flags.git 致命:无法连接到 github.com: npm 错误! git clone git://github.com/Kev/clang-flags.git github.com[0: 192.30.252.130]: errno=Connection timed out npm 错误! Linux 3.11-2-amd64 npm 错误! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" “/home/clement/.atom/.apm/.apmrc” “--userconfig” “/home/clement/.atom/.apmrc” “安装” “/tmp/d-115117-10848-qhdhe7/package.tgz " "--target=0.21.0" "--arch=x64" npm 错误!节点 v0.10.35 npm 错误! npm v2.3.0 npm 错误!代码 128 npm 错误!命令失败:克隆到裸存储库 '~/.atom/.apm/_git-remotes/git-github-com-Kev-clang-flags-git-1a523481'... npm 错误!致命:无法连接到 github.com: npm 错误! github.com[0: 192.30.252.130]: errno=连接超时 npm 错误! npm 错误! npm 错误! npm 错误!如果您需要帮助,可以在以下位置报告此错误: npm 错误! npm 错误!请在任何支持请求中包含以下文件: npm 错误! /tmp/apm-install-dir-115117-10848-1qirptl/npm-debug.log
我尝试将此添加到我的 gitconfig:
[网址“https://”]
而不是 = git://
我还将流量从端口 9418 重定向到端口 80
# iptables -t nat -L -n -v
链 PREROUTING(策略接受 24948 个数据包,4967K 字节)
pkts bytes target prot opt in out source destination
0 0 重定向 tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9418 重定向端口 80
但它不起作用。我错过了什么 ?我怎么能绕过这个块?
【问题讨论】:
标签: c++ git package atom-editor