git-proxy icon indicating copy to clipboard operation
git-proxy copied to clipboard

git-proxy failing with DNS Resolution Error for github.com

Open hemantsharma90 opened this issue 1 year ago • 2 comments

Hello Team,

I have been trying to execute git-proxy utility in our company environment which is sitting behind a Proxy Server.

Doing a standalone curl works fine with 'https://github.com' as the http_proxy/https_proxy environment variables are already set.

$ curl -kv https://github.com // Success and gives back an HTTP 200

However using the git-proxy utility and running the server via npx.

$ npx -- @finos/git-proxy --config ../new-folder/proxy.config.json Service Listening on 8080 Listening on 8000

On doing a git push for my repository, I'm getting a DNS Resolution error.

recieved action processed Error: getaddrinfo ENOTFOUND github.com at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)

Please note I have also setup up the 'npm config' variables for the company proxy server with the below commands

$npm config set proxy 'http://<proxyuser>:<proxysecret>@<proxyserverhost>:<proxyserverport>'
$npm config set https-proxy 'http://<proxyuser>:<proxysecret>@<proxyserverhost>:<proxyserverport>'

image

hemantsharma90 avatar Oct 01 '24 05:10 hemantsharma90

@hemantsharma90 - thanks for raising the ticket. I'll take a look at your issue today and see if I can establish what is going on 🙌

JamieSlome avatar Oct 02 '24 10:10 JamieSlome

Thanks @JamieSlome . Please let me know if you want me to try any step. Not sure if this could be related to nodejs not doing the dns resolution using a proxy server.

hemantsharma90 avatar Oct 07 '24 04:10 hemantsharma90

@hemantsharma90 - are you still having this issue? If not, can you please describe what you did to resolve the problem? I will close and we can look to add guidance to the documentation site 🍰

JamieSlome avatar Feb 21 '25 16:02 JamieSlome

This was fixed by setting up the npx config with company proxy server.

npx config set https-proxy <company-proxy-endpoint>

After node was able to resolve github.com DNS

hemantsharma90 avatar Mar 24 '25 23:03 hemantsharma90

@hemantsharma90 - brilliant ❤

Are we able to close this issue and make some additions to the documentation for future readers?

JamieSlome avatar Mar 25 '25 09:03 JamieSlome

@JamieSlome I've got that queued up and will raise it with the others - hopefully tomorrow!

kriswest avatar Mar 25 '25 13:03 kriswest