Skip to content

Proxies not working when proxy IP is an internal network #904

Open
@vmorales-2920

Description

@vmorales-2920

I have a repository inside a corporate network, I made a GitHub workflow to use semantic release but it fails due to proxies.
I already setup the proxies but issue persist.

semantic configuration in package.json:

"release": {
        "branches": [
            "main"
        ],
        "repositoryUrl": "https://github.com/xxxx/xxxxx.git",
        "plugins": [
            "@semantic-release/commit-analyzer",
            "@semantic-release/release-notes-generator",
            "@semantic-release/changelog",
            [
                "@semantic-release/github",
                {
                    "proxy": {
                        "host": "xxxx",
                        "port": xxxx,
                        "secureProxy": true
                    }
                }
            ],
            [
                "@semantic-release/git",
                {
                    "assets": [
                        "package.json",
                        "CHANGELOG.md"
                    ],
                    "message": "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
                }
            ]
        ]
    },

release.yml

name: Release

on:
  push:
    branches:
      - main

jobs:
  release:
    runs-on: ["xxxxxx"]
      
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "lts/*"

      - name: Install dependencies
        run: npm install

      - name: Run release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: npx semantic-release

error:

Run npx semantic-release
  
[8:52:29 PM] [semantic-release] › ℹ  Running semantic-release version 24.1.0
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[[8](https://github.com/xxxx/xxxx/actions/runs/10479003669/job/29023655288#step:7:9):52:29 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[8:52:2[9](https://github.com/xxxx/xxxx/actions/runs/10479003669/job/29023655288#step:7:10) PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "addChannel" from "@semantic-release/github"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[8:52:29 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[8:52:31 PM] [semantic-release] › ✔  Run automated release from branch main on repository https://github.com/xxxx/xxxx.git
[8:52:31 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[8:52:31 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[8:52:31 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[8:52:31 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[8:52:31 PM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication (https://api.github.com/)
[8:52:32 PM] [semantic-release] › ✘  Failed step "verifyConditions" of plugin "@semantic-release/github"
[8:52:32 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[8:52:32 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[8:52:32 PM] [semantic-release] › ✘  An error occurred while running semantic-release: RequestError [HttpError]: Although you appear to have the correct authorization credentials, the `xxxx` organization has an IP allow list enabled, and your IP address is not permitted to access this resource. - https://docs.github.com/rest/repos/repos#get-a-repository

response: {
    url: 'https://api.github.com/repos/xxxx/xxxx',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Tue, 20 Aug 2024 20:52:32 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'github.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-github-permissions': 'metadata=read',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'AE59:2608A9:1BBE627:358A145:66C50210',
      'x-ratelimit-limit': '15000',
      'x-ratelimit-remaining': '1[49](https://github.com/xxxx/xxxxh/actions/runs/10479003669/job/29023655288#step:7:50)76',
      'x-ratelimit-reset': '1724188[50](https://github.com/xxxx/xxxx/actions/runs/10479003669/job/29023655288#step:7:51)8',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '24',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Although you appear to have the correct authorization credentials, the `xxxx` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.',
      documentation_url: 'https://docs.github.com/rest/repos/repos#get-a-repository',
      status: '403'
    }
  },
  pluginName: '@semantic-release/github'

semantic version

^24.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions