cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

wgc auth login behind proxy

Open sbilello opened this issue 1 year ago • 4 comments

Component(s)

cli

Is your feature request related to a problem? Please describe.

Despite trying to specify the proxy through environment variable the wgc auth login fails

Describe the solution you'd like

add an argument that allows to specify the proxy

Describe alternatives you've considered

npm_config_proxy=myproxy npm_config_https_proxy=myproxy npx wgc auth login

got the same errors like the below one

Additional context

➜  ~ wgc auth login

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11600:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async performDeviceAuth (file:///Users/io/.nvm/versions/node/v20.7.0/lib/node_modules/wgc/dist/commands/auth/utils.js:11:22)
    at async Command.<anonymous> (file:///Users/io/.nvm/versions/node/v20.7.0/lib/node_modules/wgc/dist/commands/auth/commands/login.js:12:22)
    at async Command.parseAsync (/Users/io/.nvm/versions/node/v20.7.0/lib/node_modules/wgc/node_modules/commander/lib/command.js:936:5)
    at async file:///Users/io/.nvm/versions/node/v20.7.0/lib/node_modules/wgc/dist/index.js:8:5 {
  cause: Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
    errno: -54,
    code: 'ECONNRESET',
    syscall: 'read'
  }
}
╭────────────────────────────────────────────────────────────────╮
│                                                                │
│   Please try the below steps to solve the issue                │
│                                                                │
│   [1] Upgrade to the latest version:                           │
│       npm i -g wgc@latest                                      │
│   [2] If it persists, please open an issue:                    │
│       https://github.com/wundergraph/cosmo/issues/new/choose   │
│                                                                │
╰────────────────────────────────────────────────────────────────╯

sbilello avatar May 24 '24 22:05 sbilello

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.

github-actions[bot] avatar May 24 '24 22:05 github-actions[bot]

Hi @sbilello, Thank you for opening this issue. We'll take a look and come back.

StarpTech avatar May 28 '24 09:05 StarpTech

Hi @sbilello, is still relevant for you?

StarpTech avatar Aug 12 '24 13:08 StarpTech

Yes! It would help to try it out the SaaS solution

sbilello avatar Aug 12 '24 17:08 sbilello

Hi @sbilello ,

can you please try out using: https://github.com/wundergraph/cosmo/releases/tag/wgc%400.63.0

export HTTPS_PROXY="your.company.proxy:8080" 

wgc auth login

Depending on your environment you might need to set: export NODE_TLS_REJECT_UNAUTHORIZED=0 as well for the outgoing "update to latest" calls the cli is doing.

rel: https://github.com/wundergraph/cosmo/pull/1124

AndreasZeissner avatar Aug 28 '24 11:08 AndreasZeissner

Hi @sbilello,

We've not heard from you, so we're going to close. Please try out as suggested.

Thanks,

The WunderGraph Team

Aenimus avatar Sep 20 '24 20:09 Aenimus