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
ETIMEDOUT : API call #733
Comments
Hi @itachi1994 Are you running on self-hosted? A quick search on Google reveals that this kind of error often occurs when behind a corporate proxy. |
Hi, @peter-evans Thank you for the reply. I think this is the case. |
If you found a way to fix it I'm interested to know. |
@peter-evans I was not able to find a way to fix this issue. I ended up using the "hub" directly. |
@peter-evans My observation: Connection time out happens for self-hosted runners with proxy settings even with the personal access token but if the same action is containerized with docker it works fine. Hope this makes sense. |
@peter-evans The entire log here:
|
Try setting your corp proxy as an environment variable like this. - name: Create Pull Request
uses: peter-evans/create-pull-request@v3
env:
http_proxy: http://<proxy_address>:<port> |
Thank you for the reply. I tried using this, same error. |
Very late here, but this error is still here, and is actually a bit of an oversight by the community. Octokit does not by default look up Octokit has a constructor for use in actions, but it is not widely used, and even if it was, it also does not read proxy env vars yet. Ideally the fix would go in there but it would take a long time to proliferate across javascript actions. |
@anzboi Thank you for investigating! The most widely used constructor for Octokit in actions is probably the one in the actions toolkit here: https://github.com/actions/toolkit/blob/main/packages/github/src/utils.ts This action just uses I might be able to add the suggestion in this comment to the action. |
I've attempted to add proxy support to the action, but I haven't figured out a good way to test it yet. If either of you are able to test it out, that would be a great help. You can test it like this using the branch of PR #837 - name: Create Pull Request
uses: peter-evans/create-pull-request@proxy-support
env:
https_proxy: http://<proxy_address>:<port> |
I figured out a way to test it and added a system test: |
Released as |
Timeout error for API call
Creates new branch and commits all changes just as expected but fails with the following error:
_Error: request to https://api.github.com/repos/org/repo/pulls failed, reason: connect ETIMEDOUT_
When I run the curl with the token and URL, I get a successful result.
Steps to reproduce
Runs as a scheduler:
I am unsure if this is a bug or configuration error on my part.
The text was updated successfully, but these errors were encountered: