Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable non strict-ssl install option #74

Open
p2227 opened this issue May 11, 2016 · 8 comments
Open

enable non strict-ssl install option #74

p2227 opened this issue May 11, 2016 · 8 comments

Comments

@p2227
Copy link

p2227 commented May 11, 2016

os:win7 x64
cmd: npm i optipng-bin

error info:

> optipng-bin@3.1.1 postinstall D:\xxxxx\node_modules\optipng-bin
> node lib/install.js

  ‼ unable to verify the first certificate
  ‼ optipng pre-build test failed
  i compiling from source

i know that the error unable to verify the first certificate cause by an https download over proxy but use strict ssl.

we can config strict-ssl:false in npm config. (npm config set strict-ssl false)

how can i enable non strict-ssl download via some envionment variables or function arguments ?

I fount that the error may be cause by bin-build download caw or got

@shinnn
Copy link
Contributor

shinnn commented May 11, 2016

https://docs.npmjs.com/misc/config#environment-variables

NPM_CONFIG_STRICT_SSL=false should work.

@p2227
Copy link
Author

p2227 commented May 11, 2016

@shinnn

would you mean
set NPM_CONFIG_STRICT_SSL=false&&npm i optipng-bin?

it still get the error.

@shinnn
Copy link
Contributor

shinnn commented May 11, 2016

"How to set npm config via environment variables?" is not an issue with optipng-bin. Go to https://stackoverflow.com/ or https://github.com/npm/npm/issues instead.

@p2227
Copy link
Author

p2227 commented May 11, 2016

@shinnn
there may be a misunderstanding.
you mean download from http://registry.npmjs.org/optipng-bin width non strict-ssl mode.

my issue is about the code:

.src('http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.6/optipng-0.7.6.tar.gz')

it need to download from http://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.6/optipng-0.7.6.tar.gz this url will redirct to an https url . the error unable to verify the first certificate occur during that

@shinnn shinnn reopened this May 11, 2016
@shinnn
Copy link
Contributor

shinnn commented May 11, 2016

Yes, I misunderstood. Sorry.

Currently this module doesn't refer strict-ssl option. Instead, you can use HTTPS_PROXY enviroment variable or http-proxy npm config. Does HTTPS_PROXY work for you?

@p2227
Copy link
Author

p2227 commented May 11, 2016

I alrealy set HTTPS_PROXY .but it still get the error.

@p2227
Copy link
Author

p2227 commented May 12, 2016

i had solve the same problem .

electron-userland/electron-prebuilt#91

https://github.com/mramato/electron-prebuilt/blob/6ade629a73df6222bda245c980a16542336ab1e2/install.js#L39

we should specifies strictSSL parameter to download.

but electron-download is base on nugget. I think it's the cause of the problem.

@p2227
Copy link
Author

p2227 commented May 12, 2016

I'm sorry.
the error code is

var url = 'https://raw.github.com/imagemin/optipng-bin/v' + pkg.version + '/vendor/';

and when the BinWrapper run method is called.

but it doesn't matter. we all think that't it should make a PR to download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants