Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take over OS env variables in the GitExecutor #475

Closed
wants to merge 1 commit into from

Conversation

robinvalk
Copy link

@robinvalk robinvalk commented Nov 1, 2023

With the current setup the GitExecutor does NOT take over the OS environment variables. Because of this it fails to pull the configured SCM URL as it doesn't take into account the http_proxy settings from in the environment variables.

This PR makes sure the GitExecutor runs with the same environment variables as the main process.

@robinvalk robinvalk marked this pull request as ready for review November 1, 2023 13:00
@robinvalk robinvalk requested a review from a team as a code owner November 1, 2023 13:00
@Alex-Izquierdo
Copy link
Collaborator

Hello @robinvalk We really appreciate your contribution but the current implementation was done on purpose to keep the control over the environment and prevent potential side effects. In other words, passing through the whole environment to the command is more like using a sledgehammer to crack a nut.

The real solution to this issue should be support directly an optional http_proxy for projects and inject the respective environment variables or modify the git configuration accordingly. We already have a request feature for this and we will eventually implement it. Would you be interested in implementing this feature yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants