git-hooks.nix icon indicating copy to clipboard operation
git-hooks.nix copied to clipboard

Proxy support

Open NickHu opened this issue 2 years ago • 0 comments

In a corporate environment, sometimes git (or anything else which requires network access, e.g. curl) will not work properly without setting environment variables all_proxy, http_proxy, https_proxy etc. Because this setup runs the pre-commit hooks in a pure environment, these environment variables are not inherited, and I get errors like:

       last 10 log lines:
       >   failed to fetch `https://github.com/rust-lang/crates.io-index`
       >
       > Caused by:
       >   network failure seems to have happened
       >   if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
       >   https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
       >
       > Caused by:
       >   failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)

Is there any workaround to support this kind of usage?

NickHu avatar Apr 17 '23 10:04 NickHu