Atom-ternjs doesnt install due to firewall, workaround doesnt work either



I´m trying Atom 1.3.1 on Windows10 behind a corp-firewall without love for git:// protocol. But http & https is allowed… I dont think this is an unusual setup :smile:

However, when trying to install the package atom-ternjs it fails with:

npm WARN addRemoteGit Error: Command failed:
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:658:15)
npm WARN addRemoteGit at ChildProcess.emit (events.js:98:17)
npm WARN addRemoteGit at maybeClose (child_process.js:766:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (child_process.js:833:5)
npm WARN addRemoteGit git:// resetting remote C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f because of error: { [Error: Command failed: ] killed: false, code: 1, signal: null }
npm ERR! git clone --template=C:\Users\Dodger.atom.apm_git-remotes_templates --mirror git:// C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f: Cloning into bare repository ‘C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f’…
npm ERR! git clone --template=C:\Users\Dodger.atom.apm_git-remotes_templates --mirror git:// C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f: fatal: unable to connect to
npm ERR! git clone --template=C:\Users\Dodger.atom.apm_git-remotes_templates --mirror git:// C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f:[0:]: errno=No error
npm ERR! Windows_NT 6.2.9200
npm ERR! argv “C:\Users\Dodger\AppData\Local\atom\app-1.3.1\resources\app\apm\bin\node.exe” “C:\Users\Dodger\AppData\Local\atom\app-1.3.1\resources\app\apm\node_modules\npm\bin\npm-cli.js” “–globalconfig” “C:\Users\Dodger\.atom\.apm\.apmrc” “–userconfig” “C:\Users\Dodger\.atom\.apmrc” “install” “C:\Users\Dodger\AppData\Local\Temp\d-1151111-448-1w5tgek\package.tgz” “–target=0.34.3” "–arch=ia32"
npm ERR! node v0.10.40
npm ERR! npm v2.13.3
npm ERR! code 128

npm ERR! Command failed: Cloning into bare repository ‘C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f’…
npm ERR! fatal: unable to connect to
npm ERR![0:]: errno=No error
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!

I already tried the following workaround in .gitconfig suggested on some issues for other packages:

[url “https://”]
insteadOf = git://

But without success. It still fails… any ideas how to install a package if git:// isn´t accessable ?


That .gitconfig entry seems to be correct. Did you report the error to npm as the message suggests? Also, do

git config --global -l

and verify that the output includes:


If it doesn’t, you’ll need to figure out why git doesn’t see the .gitconfig file.


You may want to file an Issue with the atom-ternjs package and see if they can set up something so they don’t have to use the git:// protocol on installation.


Hey there.

I could try to modify the npm-shrinkwrap.json that is used for atom-ternjs to use https:// instead.
It works on my local machine but i have no clue what other side effects it may produce to modify the npm-shrinkwrap.json from git:// to https://.


sorry for the late reply. I checked my git-config with git config --global -l and it shows url.https://.insteadof=git:// as expected.
BUT, maybe off-topic, I have to start the Git-Shell that got installed with Github Desktop, git isn´t in my $PATH (so no git in Powershell e.g.). Maybe Atom isn´t loading my .git-config file ? How can I verify this in Atom ?

I´m not sure if using https:// over git:// is desireable for package-maintainers. But it would at least ease the situation for users behind restrictive firewalls.


I will give it a try and modify the shrinkwrap file for the next release.
We will see if this solves the problem and still works for the other users.


New release was published a few minutes ago.
I modified the npm-shrinkwrap file to resolve Tern via https:// instead of git://.

You may give it a try and keep me updated.



Sorry, was on vacation. Just tried to update my packages incl. atom-ternjs and it worked just fine !
Thx !


<soapbox>Well, the right solution is to get firewall vendors and administrators to set them up to be more git-friendly, and for firewalls to be far easier to configure for non-HTTP protocols. But good luck waiting for that.</soapbox>