openneuro icon indicating copy to clipboard operation
openneuro copied to clipboard

Usage with HTTP proxy

Open HippocampusGirl opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. One of our workstations cannot access the internet except through an HTTP proxy server. I have set up the environment variables HTTP_PROXY and HTTPS_PROXY, which makes most applications work. For example, npm downloads installs the package @openneuro/cli without any issue.

However, when I try to run openneuro download ds000108 ds000108, I get the following error:

FetchError: request to https://openneuro.org/crn/graphql failed, reason: connect ECONNREFUSED 99.84.146.16:443
    at ClientRequest.<anonymous> (/home/lea/miniconda3/lib/node_modules/@openneuro/cli/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (events.js:400:28)
    at ClientRequest.emit (domain.js:470:12)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:400:28)
    at TLSSocket.emit (domain.js:470:12)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

Describe the solution you'd like The program should detect the environment variable HTTP_PROXY and/or HTTPS_PROXY and use it when making requests to the internet.

Describe alternatives you've considered I am now using the aws command to download OpenNeuro datasets, which works quite well.

HippocampusGirl avatar Jan 22 '22 10:01 HippocampusGirl