DefinitelyTyped / grunt-tsd

Grunt plugin to automate TSD and TypeScript definition related tasks
MIT License
16 stars 8 forks source link

Unable to install from behind firewall #12

Open turp opened 9 years ago

turp commented 9 years ago

When I try to do "npm install grunt-tsd --save-dev" from behind our corporate firewall, I get the following error because the git URL is git:// instead of https://. I'd be happy to update the package and submit a pull request, but I'm not sure what the proper protocol is :)

npm WARN engine tsd@0.5.7: wanted: {"node":">= 0.10.0 < 0.11.0"} (current: {"node":"0.12.0","npm":"2.5.1"}) npm WARN git config --get remote.origin.url returned wrong result (git://github.com/Bartvds/update-notifier/)

npm ERR! git clone git://github.com/Bartvds/update-notifier/ Cloning into bare repository 'C:\Users\xxxxxxxx\App Data\Roaming\npm-cache_git-remotes\git-github-com-Bartvds-update-notifier--a420e038'... npm ERR! git clone git://github.com/Bartvds/update-notifier/ fatal: unable to connect to github.com: npm ERR! git clone git://github.com/Bartvds/update-notifier/ github.com[0: 192.30.252.130]: errno=No such file o r directory npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cl i.js" "install" "grunt-tsd" "--save-dev" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code 128

gghez commented 9 years ago

A solution for me:

Remove grunt-tsd, use grunt-shell combined to tsd, then in Gruntfile.js:

        shell: {
            tsd: {
                command: './node_modules/.bin/tsd --config tsd.json reinstall'
            }
        },
aikrez commented 9 years ago

@turp You can set the following config for git to use https instead of git:// in .gitconfig [url "https://"] insteadOf = git://

turp commented 9 years ago

Worked great @aikrez. Thanks!

On Thu, Aug 13, 2015 at 12:44 AM, aikrez notifications@github.com wrote:

@turp https://github.com/turp You can set the following config for git to use https instead of git:// in .gitconfig [url "https://"] insteadOf = git://

— Reply to this email directly or view it on GitHub https://github.com/DefinitelyTyped/grunt-tsd/issues/12#issuecomment-130566646 .

kasingal commented 3 years ago

@turp You can set the following config for git to use https instead of git:// in .gitconfig [url "https://"] insteadOf = git://

It seems not working, I even tried below:

git config --global url."https://".insteadOf git:// git config --global url."https://github.com/".insteadOf git@github.com: git config --global url."git@github.com:".insteadOf git://github.com/ git config --global url."https://github.com/Bartvds/update-notifier/".insteadOf git://github.com/Bartvds/update-notifier/ git config --global url."https://github.com/Bartvds/update-notifier".insteadOf git://github.com/Bartvds/update-notifier

none of above worked !