How to configure GitSCM to use a proxy different from what is configured in the plugin?

We’re using Jenkins 2.303.1 .

We normally use an in-house git server behind a firewall. We’re doing a POC to use an external git server. We’re unable to get checkout with “GitSCM” work, because it appears that we’re unable to control the proxy used by GitSCM. I’ve tried various ways to do it, but GitSCM seems to ignore environment variables. I’ve gone through the GitSCM documentation, and I don’t see an obvious way to do this.

You might try configuring the HTTP proxy for Jenkins in “Manage Jenkins” → “System”.

There is also a stack overflow article that describes proxy configuration using git commands. The Jenkins config file provider plugin can deliver a .gitconfig file to the home directory of the user running each agent.