Skip to content

no_proxy env setting not taken in consideration #222

Open
@denizhoxha

Description

@denizhoxha

Describe the bug
The no_proxy environement settings is not taken in consideration when executing github

To Reproduce
Steps to reproduce the behavior:

  1. configure github self-hosted runner with proxy .
  2. configure a action runner workflow which make use of the latest version of github-script to create a team
  3. it throws the following error: Error: Unhandled error: HttpError: request to https://xxxxx/api/v3/orgs/xxxxx/teams failed, reason: tunneling socket could not be established, statusCode=403

Expected behavior
Honoring the no_proxy config

Screenshots
Setup Job:
Current runner version: '2.279.0'
Runner name: 'ip-.........'
Runner group name: '.........'
Machine name: 'ip-.........'
GITHUB_TOKEN Permissions
Runner is running behind proxy server 'htt.........' for all HTTPS requests.
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2'
Download action repository 'actions/github-script@v5'

github-script-task:

Run actions/github-script@v5
  with:
    github-token: ***
    result-encoding: string
    script: await github.rest.teams.create({
            org: 'xxxxx',
            name: 'xxxxx',
            maintainers: [ context.payload.sender.id ]
          });
  
    debug: false
    user-agent: actions/github-script
  env:
    no_proxy: localhost,127.0.0.1,xxxx,xxxx,xxx,xxx,xxx
    NODE_EXTRA_CA_CERTS: ...xxxxx...
(node:10011) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
RequestError [HttpError]: request to https://xxxx/api/v3/orgs/xxxx/teams failed, reason: tunneling socket could not be established, statusCode=403
    at /home/runner/actions-runner/_work/_actions/actions/github-script/v5/dist/index.js:4636:11
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async eval (eval at callAsyncFunction (/home/runner/actions-runner/_work/_actions/actions/github-script/v5/dist/index.js:4942:56), <anonymous>:3:1)
    at async main (/home/runner/actions-runner/_work/_actions/actions/github-script/v5/dist/index.js:4997:20) {
  name: 'HttpError',
  status: 500,
  request: {
    method: 'POST',
    url: 'https://xxxxx/api/v3/orgs/xxxxx/teams',
    headers: {
      accept: 'application/vnd.github.-preview+json',
      'user-agent': 'actions/github-script octokit-core.js/3.5.1 Node.js/12.13.1 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"name":"xxxxx","maintainers":[xxxxx]}',
    request: { agent: [TunnelingAgent], hook: [Function: bound bound register] }
  }
}
Error: Unhandled error: HttpError: request to https://xxxxx/api/v3/orgs/xxxxx/teams failed, reason: tunneling socket could not be established, statusCode=403

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions