You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use node-fetch for git-node-land (not sure about other commands) so at least it should be fairly doable by using one of the proxy agent implementations on npm with https://github.com/node-fetch/node-fetch#custom-agent in this abstraction that most of our HTTP requests go through But be aware that users need to configure the proxy setting for the git repository so that git picks it up and that may be tricky, especially for people who use SSH instead of HTTPS (then the setting needs to go to the SSH config, which is global), to make git-node support all of them automatically, we may have to change the setting of the entire system.
Anyway I'd say PRs to make the option effective for our own HTTP requests are welcomed. We could just prompt the users that they need to do something about their own git/ssh configs for everything to go through the proxy and leave it at that at least.
Activity
targos commentedon Apr 27, 2020
I think if we support
git node set proxy, the configured proxy should then be used automatically, not with an explicit--proxyflag in the commands.himself65 commentedon Apr 27, 2020
sure, and use proxy config in global
.gitconfigis also ok. Just need a way to use proxy whatever it is :|targos commentedon Apr 27, 2020
another way to provide proxy that I have seen is to set the
http_proxyandhttps_proxyenvironment variables.himself65 commentedon Apr 27, 2020
I don't think it has any effect... :(

targos commentedon Apr 27, 2020
No, but I mean that we could support that or use a library that does
joyeecheung commentedon Apr 27, 2020
We use node-fetch for git-node-land (not sure about other commands) so at least it should be fairly doable by using one of the proxy agent implementations on npm with https://github.com/node-fetch/node-fetch#custom-agent in this abstraction that most of our HTTP requests go through But be aware that users need to configure the proxy setting for the git repository so that git picks it up and that may be tricky, especially for people who use SSH instead of HTTPS (then the setting needs to go to the SSH config, which is global), to make git-node support all of them automatically, we may have to change the setting of the entire system.
Anyway I'd say PRs to make the option effective for our own HTTP requests are welcomed. We could just prompt the users that they need to do something about their own git/ssh configs for everything to go through the proxy and leave it at that at least.
himself65 commentedon Apr 28, 2020
I code a simple implementation for self-use, later I will finish the PR