Open raphaelperrin24 opened 1 year ago
Maybe somehow related:
The GitHub provider does not have any proxy-related code or behavior; I imagine that the answer may lie in either the go-github package or else Terraform proxy behavior as a whole. I'm going to close this issue now as there hasn't been a response in quite some time, though please feel free to reopen if you feel it's warranted.
@kfcampbell can you reopen this please?
The issue referenced above shows exactly how to implement this.
It has to be setup on go's http client this is reused in the library google/go-github
.
The issue referenced above shows exactly how to implement this.
There's not a linked issue above. What issue are you referring to?
It has to be setup on go's http client this is reused in the library google/go-github.
What does that mean about the provider's involvement? It seems unrelated.
Hi @kfcampbell, I agree with the assessment from @mkilchhofer and @raphaelperrin-swisspost that the current implementation doesn't adhere to proxy settings when making requests to GitHub.
Upon examining the go-github project, which is responsible for creating the actual HTTP client, we find two methods for client creation: NewClient() and NewClientWithEnvProxy() (introduced in https://github.com/google/go-github/pull/2686). Since you're employing the NewClient() method without explicitly supplying any proxy-related configuration, no proxy is being utilized at all.
I believe a straightforward solution would be to simply replace NewClient() with NewClientWithEnvProxy(). This would ensure that proxy settings are respected when making requests to GitHub.
Please share your thoughts on this approach.
There's not a linked issue above. What issue are you referring to?
This one here:
What does that mean about the provider's involvement? It seems unrelated.
See detailed answer of @smittnacht
@mkilchhofer @kfcampbell @raphaelperrin-swisspost could someone of you or any other maintainer reopen this issue please?
Reopened; sorry about that. I'm receptive to ideas or PRs are about how to fix this!
👋 Hey Friends, this issue has been automatically marked as stale
because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned
label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Not stale
Using TFE on premise behind a company proxy.
On Applying plan, we get the error below:
Error: Post "https://api.github.com/user/repos": dial tcp 140.82.121.5:443: connect: connection timed out
Wondering if the provider respects the setting. In the worker container, the proxy settings are set as environment variables.