git is blocked, how to install npm modules

后端 未结 3 1344
感动是毒
感动是毒 2021-01-30 11:18

We are connected through a proxy and here, git is blocked ( not the website but on git//: ) we tried with egit, \"git on windows\", with and without proxy but n

3条回答
  •  無奈伤痛
    2021-01-30 11:39

    The git proxy setting worked for me for cloning repos from github. But, when installing/updating a npm module that uses a git url, I am still getting the timeout error. The workaround for me was to set the proxy manually in the .git/config file for the repo.

    [http]
        proxy = http://proxy.company.com:8888   
    

    But wait, there is more: this worked for some git url but not for other. The second and final workaround was to make sure the git proxy is set in both user config files, since my PC had a shared network user home on I drive:

    I:\.gitconfig
    C:\Users\\.gitconfig
    

    Credits to this comment.

提交回复
热议问题