1

I'm trying to install atom-beautify plugin to GitHub Atom editor with apm but still getting this error:

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>

I'm behind corporate proxy but I have configured it properly and can execute e.g. these commands with no error:

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

my .apmrc

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

some other conf

  • Windows 7 64bit
  • Atom 0.176.0
  • Git 1.9.5.msysgit.0

I've already discussed this problem on plugin's forum on GitHub but with no success. Any suggestions?

Knut Holm
  • 3,988
  • 4
  • 32
  • 54

2 Answers2

3

This is known npm bug, it has been almost fixed, see https://github.com/npm/npm/pull/5621/commits (unfortunately merge failed). Quick and dirty fix: add this line u = u.replace(/^git:/, "https:") before var normalized = normalizeGitUrl(u) in add-remote.git.js (AppData\Local\atom\app-0.176.0\resources\app\apm\node_modules\npm\lib\cache\add-remote.git.js)

Piotr
  • 116
  • 2
  • That's different error, seems like git issue, try to update git from http://msysgit.github.io/ – Piotr Feb 03 '15 at 11:11
  • 1.9.5.msysgit.0. Google 'Unable to find remote helper for 'https'', that's quite common issue – Piotr Feb 03 '15 at 11:24
  • Got it. The second problem was definitely in git - I've installed [cURL for Windows](http://www.confusedbycode.com/curl/) but that's not enough, the trick is to [reinstall](http://stackoverflow.com/a/13018777/3780766) git after cURL installation. Anyway, this is the correct answer. – Knut Holm Feb 03 '15 at 12:47
  • Glad I could help. Hopefully one day this annoying bug will be fixed :) – Piotr Feb 03 '15 at 13:03
1

The accepted answer did not work for me. What did work, was to add more git folders to the path.

I have a batch file, e.g. atom-gitpaths.bat with the following contents:

@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
Caleb Hattingh
  • 9,005
  • 2
  • 31
  • 44