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


#1

Hi,

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://github.com/ternjs/tern.git#f585fe7d6f4da28770fdd3dc7ddf88a39ad9b105 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://github.com/ternjs/tern.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://github.com/ternjs/tern.git C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f: fatal: unable to connect to github.com:
npm ERR! git clone --template=C:\Users\Dodger.atom.apm_git-remotes_templates --mirror git://github.com/ternjs/tern.git C:\Users\Dodger.atom.apm_git-remotes\git-github-com-ternjs-tern-git-1c8e734f: github.com[0: 192.30.252.131]: 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 github.com:
npm ERR! github.com[0: 192.30.252.131]: errno=No error
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

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 ?


#2

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:

url.https://.insteadof=git://

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


#3

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.


#4

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://.


#5

Hi,
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.


#6

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.


#7

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.

Greetings.


#8

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


#9

<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>