C++ 安装git端口被阻止的Atom软件包

C++ 安装git端口被阻止的Atom软件包,c++,git,package,atom-editor,C++,Git,Package,Atom Editor,我正在尝试为atom安装autocomplete clang插件。不幸的是,我的公司防火墙阻止了git://协议使用的9418端口 我可以安装使用https://URL克隆git repos和依赖项的插件,但当我尝试安装autocomplete clang时,我会遇到以下错误: npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/Kev/clang-flags.git) htt

我正在尝试为atom安装autocomplete clang插件。不幸的是,我的公司防火墙阻止了git://协议使用的9418端口

我可以安装使用https://URL克隆git repos和依赖项的插件,但当我尝试安装autocomplete clang时,我会遇到以下错误:

npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/Kev/clang-flags.git) https://github.com/Kev/clang-flags.git npm ERR! git clone git://github.com/Kev/clang-flags.git Cloning into bare repository '~/.atom/.apm/_git-remotes/git-github-com-Kev-clang-flags-git-1a523481'... npm ERR! git clone git://github.com/Kev/clang-flags.git fatal: unable to connect to github.com: npm ERR! git clone git://github.com/Kev/clang-flags.git github.com[0: 192.30.252.130]: errno=Connection timed out npm ERR! Linux 3.11-2-amd64 npm ERR! 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" "install" "/tmp/d-115117-10848-qhdhe7/package.tgz" "--target=0.21.0" "--arch=x64" npm ERR! node v0.10.35 npm ERR! npm v2.3.0 npm ERR! code 128 npm ERR! Command failed: Cloning into bare repository '~/.atom/.apm/_git-remotes/git-github-com-Kev-clang-flags-git-1a523481'... npm ERR! fatal: unable to connect to github.com: npm ERR! github.com[0: 192.30.252.130]: errno=Connection timed out npm ERR! npm ERR! npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! npm ERR! Please include the following file with any support request: npm ERR! /tmp/apm-install-dir-115117-10848-1qirptl/npm-debug.log npm WARN`git config--get remote.origin.url`返回了错误的结果(git://github.com/Kev/clang-flags.git) https://github.com/Kev/clang-flags.git npm错误!git克隆git://github.com/Kev/clang-flags.git 克隆到裸存储库“~/.atom/.apm/_git-remotes/git-github-com-Kev-clang-flags-git-1a523481”。。。 npm错误!git克隆git://github.com/Kev/clang-flags.git 致命:无法连接到github.com: npm错误!git克隆git://github.com/Kev/clang-flags.git github.com[0:192.30.252.130]:errno=连接超时 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:

[url "https://"] insteadOf = git:// [网址“https://”] 代替=吉特:// 我还将流量从端口9418重定向到端口80

# iptables -t nat -L -n -v Chain PREROUTING (policy ACCEPT 24948 packets, 4967K bytes) pkts bytes target prot opt in out source destination 0 0 REDIRECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9418 redir ports 80 #iptables-tnat-L-n-v 链预路由(策略接受24948个数据包,4967K字节) pkts字节目标保护选择退出源目标 0 0重定向tcp--**0.0.0.0/0 0.0.0/0 tcp dpt:9418重拨端口80
但它不起作用。我错过什么了吗?如何绕过此块?

如果无法指示git始终使用https而不是git,请先尝试:

git config --global url."https://".insteadOf git://
确认要链接的问题,涉及:

apm
不尊重
git配置--全局url。“https://”。而不是git://

Opera补充道:

我编辑了该文件(现在包含中引用的代码),并添加了上一条评论中建议的替换调用


这就是我用来编辑gitconfig的内容。只是再试一次,不起作用。@Opera您使用的是什么版本的Git?$Git——版本Git 1.8.5。1@Opera除非Atomio在内部使用另一个git(jgit?libgit2?),否则这应该是可行的。该工具中有.gitconfig吗?@Opera按照中的说明查找cache.js