yo easy-ui5 project - Fails when behind corporate proxy
See original GitHub issueWhen behind the corporate proxy the generator fails with the following error:
Failed to connect to GitHub to retrieve available repository for "ui5-community" organization! Run with --verbose for details! RequestError [HttpError]: request to https://api.github.com/orgs/ui5-community/repos failed, reason: connect ECONNREFUSED 52.63.231.178:443 at C:\Users\sattsaevk\AppData\Roaming\npm\node_modules\generator-easy-ui5\node_modules\@octokit\request\dist-node\index.js:108:11 at processTicksAndRejections (internal/process/task_queues.js:95:5) at async module.exports.prompting (C:\Users\sattsaevk\AppData\Roaming\npm\node_modules\generator-easy-ui5\generators\app\index.js:108:18) { status: 500, request: { method: 'GET', url: 'https://api.github.com/orgs/ui5-community/repos', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'generator-easy-ui5:3.0.1 octokit-rest.js/18.6.7 octokit-core.js/3.5.1 Node.js/14.17.0 (win32; x64)' }, request: { hook: [Function: bound bound register] } } }
The 'npm config proxy ’ has been added but does not solve the issue.
// create the octokit client to retrieve the generators from GH org const octokit = new Octokit({ userAgent:
${this.rootGeneratorName()}😒{this.rootGeneratorVersion()}, auth: this.options.ghAuthToken, });
Needs to be passed on a proxy?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
IMO, we should make the node proxy configuration available to the internally used
Octokit
APIs. I’ll try to investigate this asap.The issue is not Octokit, this works fine. However yeoman has a problem with the proxy. It doesn’t use the http_proxy / https_proxy env variables.
You can try cmd
yo doctor
and this should also fail Set the GLOBAL_AGENT_HTTP_PROXY variable to your proxy and it should work.