【问题标题】:Impossible to install atom-beautify on Windows 7 64bit machine with apm无法使用 apm 在 Windows 7 64 位机器上安装 atom-beautify
【发布时间】:2015-03-28 19:30:42
【问题描述】:

我正在尝试使用apmatom-beautify 插件安装到GitHub Atom 编辑器,但仍然出现此错误:

npm ERR! git fetch -a origin (https://github.com/Benvie/harmony-collections.git) fatal: Unable to find remote helper for 'https'
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/ariya/esprima.git)
npm ERR! git clone git://github.com/ariya/esprima.git Cloning into bare repository 'C:\Users\pc00120\.atom\.node-gyp\.atom\.apm\_git-remotes\git-github-com-ariya-esprima-git-9077e517'...
npm ERR! git clone git://github.com/ariya/esprima.git fatal: Unable to look up github.com (port 9418) (Unknown host.)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\bin\\node.exe" "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\.apmrc" "--userconfig" "C:\\Users\\pc00120\\.atom\\.apmrc" "install" "C:\\Users\\pc00120\\AppData\\Local\\Temp\\d-115029-4180-1mvqz47\\package.tgz" "--target=0.20.0" "--arch=ia32" "--msvs_version=2012"
npm ERR! node v0.10.35
npm ERR! npm  v2.3.0
npm ERR! code 128

npm ERR! Command failed: fatal: Unable to find remote helper for 'https'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

我在公司代理后面,但我已经正确配置它并且可以执行例如这些命令没有错误:

git clone https://github.com/Benvie/harmony-collections.git
git clone git://github.com/ariya/esprima.git

我的.apmrc

https-proxy=http://username:passwd@my.proxy.com:3128
http-proxy=http://username:passwd@my.proxy.com:3128
strict-ssl=false

其他一些约定

  • Windows 7 64 位
  • 原子 0.176.0
  • Git 1.9.5.msysgit.0

I've already discussed this problem on plugin's forum on GitHub 但没有成功。有什么建议吗?

【问题讨论】:

    标签: windows git github npm atom-editor


    【解决方案1】:

    接受的答案对我不起作用。 所做的 工作是将更多的 git 文件夹添加到路径中。

    我有一个批处理文件,例如atom-gitpaths.bat 内容如下:

    @ECHO OFF
    ECHO Adding Git paths to the system path...
    PATH=C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core;%PATH%
    ECHO Done. Launching atom...
    CALL atom.cmd
    

    【讨论】:

      【解决方案2】:

      这是已知的 npm 错误,几乎已修复,请参阅 https://github.com/npm/npm/pull/5621/commits(不幸的是合并失败)。快速而肮脏的修复:在 add-remote.git.js (AppData\Local\atom\app-0.176.0\resources\app\apm\node_modules\npm\lib\cache\add-remote.git.js) 中的 var normalized = normalizeGitUrl(u) 之前添加这一行 u = u.replace(/^git:/, "https:")

      【讨论】:

      • 那是另一个错误,似乎是 git 问题,尝试从 msysgit.github.io 更新 git
      • 1.9.5.msysgit.0。谷歌“找不到‘https’的远程助手”,这是很常见的问题
      • 知道了。第二个问题肯定是在 git 中——我已经安装了 cURL for Windows 但这还不够,诀窍是在 cURL 安装后到 reinstall git。无论如何,这是正确的答案。
      • 很高兴我能帮上忙。希望有一天这个烦人的错误会得到修复:)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-28
      • 1970-01-01
      • 1970-01-01
      • 2018-10-07
      • 1970-01-01
      相关资源
      最近更新 更多