Repository navigation
Open
Description
Creating GitHub release is failing when semantic-release is executed on an Openshift behind a corporate proxy.
When working on an Openshift clusters without a proxy the same configuration works fine. Also, the corporate proxy works fine in all other cases.
I tried configuring the proxy using HTTP_PROXY and HTTPS_PROXY environment variables and via the following .releaserc config:
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
{
"name": "main",
"prerelease": false
}
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular"
}
],
"@semantic-release/changelog",
[
"@semantic-release/github",
{
"proxy": {
"host": "XXXXX [redacted]",
"port": 3128,
"secureProxy": false
}
}
]
]
}However, in all cases I'm getting the following error:
2023-09-11T12:53:48.405Z semantic-release:get-git-auth-url Verifying ssh auth by attempting to push to https://git:[secure]@github.com/XXXXX.git
2023-09-11T12:53:51.494Z semantic-release:get-tags found tags for branch main: []
2023-09-11T12:53:51.503Z semantic-release:get-tags found tags for branch test-sem-ver-proxy: []
[12:53:51 PM] [semantic-release] › ✔ Run automated release from branch test-sem-ver-proxy on repository https://git:[secure]@github.com/XXXXXX.git
[12:53:51 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[12:53:51 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
[12:53:51 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
[12:53:51 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[12:53:51 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[12:53:51 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
[12:53:51 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication
[12:54:46 PM] [semantic-release] › ✘ Failed step "verifyConditions" of plugin "@semantic-release/github"
[12:54:46 PM] [semantic-release] › ✘ An error occurred while running semantic-release: RequestError [HttpError]: fetch failed
at /usr/local/lib/node_modules/@semantic-release/github/node_modules/@octokit/request/dist-node/index.js:136:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async requestWithGraphqlErrorHandling (/usr/local/lib/node_modules/@semantic-release/github/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
at async Job.doExecute (/usr/local/lib/node_modules/@semantic-release/github/node_modules/bottleneck/light.js:405:18) {
status: 500,
request: {
method: 'GET',
url: 'https://github.com/proxy/api.github.com/repos/XXXXXX',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': '@semantic-release/github v9.0.5 octokit-core.js/5.0.0 Node.js/18.17.1 (linux; x64)',
authorization: 'token [REDACTED]'
},
request: {
agent: [HttpsProxyAgent],
hook: [Function: bound bound register],
retryCount: 3,
retries: 3,
retryAfter: 16
}
},
pluginName: '@semantic-release/github'
}
AggregateError:
HttpError: fetch failed
at /usr/local/lib/node_modules/@semantic-release/github/node_modules/@octokit/request/dist-node/index.js:136:11
at async requestWithGraphqlErrorHandling (/usr/local/lib/node_modules/@semantic-release/github/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
at async Job.doExecute (/usr/local/lib/node_modules/@semantic-release/github/node_modules/bottleneck/light.js:405:18)
at file:///usr/local/lib/node_modules/�[4msemantic-release�[24m/lib/plugins/pipeline.js:55:13
at async pluginsConfigAccumulator.<computed> [as verifyConditions] (file:///usr/local/lib/node_modules/�[4msemantic-release�[24m/lib/plugins/index.js:87:11)
at async run (file:///usr/local/lib/node_modules/�[4msemantic-release�[24m/index.js:106:3)
at async Module.default (file:///usr/local/lib/node_modules/�[4msemantic-release�[24m/index.js:275:22)
at async default (file:///usr/local/lib/node_modules/�[4msemantic-release�[24m/cli.js:55:5) {
errors: [
RequestError [HttpError]: fetch failed
at /usr/local/lib/node_modules/�[4m@semantic-release�[24m/github/node_modules/�[4m@octokit�[24m/request/dist-node/index.js:136:11
�[90m at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
at async requestWithGraphqlErrorHandling (/usr/local/lib/node_modules/�[4m@semantic-release�[24m/github/node_modules/�[4m@octokit�[24m/plugin-retry/dist-node/index.js:71:20)
at async Job.doExecute (/usr/local/lib/node_modules/�[4m@semantic-release�[24m/github/node_modules/�[4mbottleneck�[24m/light.js:405:18) {
status: �[33m500�[39m,
request: �[36m[Object]�[39m,
pluginName: �[32m'@semantic-release/github'�[39m
}
]
}
Is there an error in my configuration? Otherwise, I would greatly appreciate any help with further troubleshooting.
Reacted by Mel Teichmann, UDWSU1, Miroslav Vrana, channon4, Vale Hettlinger, dashuaige2000 and riverron
Metadata
Metadata
Assignees
Labels
No labels
Activity
UDWSU1 commentedon Nov 1, 2023
@USI-KMD Have you figured it out. Dealing with similar issue.
travi commentedon Nov 3, 2023
open to a PR to improve documentation or suggestion for a fix if there is a problem with the current implementation, but could use help investigating this. i have no environment to test this scenario from. if someone could provide a public reproduction, that could be a place to start
channon4 commentedon Nov 15, 2023
I also am finding that proxy settings are not respected. I can reproduce locally while on/off our corporate VPN.
I dont know how to set up a proxy quickly but the easiest way to tell there is an issue is by setting the proxy environment variables to random values and see that it still works which it shouldnt.
This url is fake so we should expect semantic release to fail but yet it works
travi commentedon Dec 6, 2023
likely related: octokit/request.js#577
dashuaige2000 commentedon Jul 9, 2024
I also have the same mistake, proxy IP is an internal network
vmorales-2920 commentedon Aug 20, 2024
Facing same issues, have you found a solution?
riverron commentedon Jan 9, 2025
@USI-KMD @vmorales-2920 I am facing a similar issue. By any chance have you figured out the solution for this issue?
vmorales-2920 commentedon Jan 9, 2025
Hi @riverron, I couldn't find a solution for that issue, what I did was to use another npm package called standard-version (https://www.npmjs.com/package/standard-version). Hope this helps
ruZZintl commentedon May 4, 2025
We worked around it by unsetting proxy in envs / config and running the semantic-release step through proxychains.