Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

no_proxy env setting not taken in consideration

未关闭
#222 3 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
领域
api

调研方向

Reproduce the self-hosted runner workflow using actions/github-script@v5 with an HTTPS proxy and the shown no_proxy environment value. Inspect the request path reported in dist/index.js around line 4636; done means requests to hosts listed in no_proxy honor the setting instead of being sent through the proxy.

由索引模型根据 Issue 内容生成。

描述

bug

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
主要语言
TypeScript
星标
5k
派生
586
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

actions/github-script 的其他 Issue

查看 actions/github-script 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。