octokit / request-action

A GitHub Action to send arbitrary requests to GitHub's REST API

Home Page:https://github.com/marketplace/actions/GitHub-API-Request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Time out error behind a proxy

vppawar opened this issue · comments

I am trying to use the action behind the proxy

- # Action that gets the user information
        uses: octokit/request-action@v2.x
        id: get_user_info
        with:
          route: GET /users/${{ github.event.issue.user.login }}
        env:
          GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
          http_proxy: "xxxxx"
          https_proxy: "xxxxx"

This is giving the timeout error

Run octokit/request-action@v2.x
/usr/bin/docker exec  fe3c2a23934f2469271a5bfd5a1a780c5380eebc5f51836793013bc2c3d315c3 sh -c "cat /etc/*release | grep ^ID"
GET /users/vppawar
> mediaType: [object Object]
Error: request to https://api.github.com/users/vppawar failed, reason: connect ETIMEDOUT 192.30.255.117:443

The endpoint https://api.github.com/users/vppawar works fine when called using curl after specifying the proxy

I'm sorry I'm not familiar with the http_proxy / https_proxy settings. Do other requests work? Maybe the code cannot reach 192.30.255.117?

@gr2m : We tried to call the curl from the same system where the runner is installed , and it is giving us correct results.

curl -X GET -u $GITHUB_TOKEN:x-oauth-basic 'https://api.github.com/users/vppawar'

Is that you mean when you say code cannot reach to 192.30.255.117?

@gr2m : The question is how we can use this action behind the proxy?

I'm sorry I'm not familiar with the http_proxy / https_proxy settings. Do other requests work? Maybe the code cannot reach 192.30.255.117?

@gr2m The other request also does not work. How can we make it work behind the proxy?

Run octokit/request-action@v2.x
/usr/bin/docker exec  60bc6ca797260c4c477da68cbe1bd879ff325368d06be5f796560af5e9f8e3de sh -c "cat /etc/*release | grep ^ID"
GET /repos/{owner}/{repo}/releases/latest
> owner: octokit
> repo: request-action
> mediaType: [object Object]
Error: request to https://api.github.com/repos/octokit/request-action/releases/latest failed, reason: connect ETIMEDOUT 192.30.255.116:443

@imwiss do you know someone who could help here? I'm not familiar with how the proxy is setup (documentation)

@vppawar can you enable debug logs? See https://github.com/octokit/request-action/#debugging

@vppawar is this still an issue for you? Did you find out anything new?

@gr2m : We found a different solution where we are giving running the script which calls the GitHub REST API directly.