Closed (won't fix)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Base system (internal API)
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Jun 2012 at 04:58 UTC
Updated:
11 Sep 2013 at 11:53 UTC
Comments
Comment #1
jhedstromCould you run the make command with either -v or --debug and post any relevant errors here?
Comment #2
roynilanjan commentedhere is the debug lines after executing with -v attr
Executing: wget -q --timeout=30 -O /tmp/download_filepZyxDV https://github.com/johndyer/mediaelement/zipball/2.8.2
Unable to download mediaelement from https://github.com/johndyer/mediaelement/zipball/2.8.2
is there some how i can pass no-cert attribute for https in wget!!?
here is more debug info for different url,
Make new site in the current directory? (y/n): y
Unable to download geophp from https://github.com/downloads/phayes/geoPHP/geophp.tar.gz. [error]
ubuntu@virtual1:/srv/www/236/web/profiles/ericsson$ drush --debug -y make --no-core --contrib-destination=. ericsson.make
Bootstrap to phase 0. [0.01 sec, 2.97 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.15 MB] [bootstrap]
Cache HIT cid: 6.0-dev-commandfiles-0-bebce09199701e3f4d98d388b9f03789 [0.01 sec, 3.16 MB] [debug]
Bootstrap to phase 0. [0.08 sec, 6.79 MB] [bootstrap]
Bootstrap to phase 0. [0.11 sec, 6.79 MB] [bootstrap]
Found command: make (commandfile=make) [0.11 sec, 6.79 MB] [bootstrap]
Loading release_info engine. [0.18 sec, 6.81 MB] [notice]
Make new site in the current directory? (y/n): y
Executing: which wget
/usr/bin/wget
Executing: wget -q --timeout=30 -O /tmp/download_filegxndMw https://github.com/downloads/phayes/geoPHP/geophp.tar.gz
Unable to download geophp from https://github.com/downloads/phayes/geoPHP/geophp.tar.gz. [23.08 sec, 6.99 MB] [error]
Command dispatch complete [23.09 sec, 6.96 MB] [notice]
Peak memory usage was 7.76 MB [23.09 sec, 6.96 MB] [memory]
Comment #3
bojanz commentedI have the same problem.
Mac OS X, no wget.
-v gives me:
Funny thing is, copying both commands into a new prompt works...
Tried with sudo as well, thinking it might be a permission issue.
If I replace the https:// part of the url with git:// it works fine.
EDIT: It was a cert issue, but only when drush invoked git. Fixed by making git not validate certificates.
Comment #4
benjifisherIf you want to figure out what is wrong, you have to run wget without the
-qflag. I tried the example from #2:I think what we want is a way to pass the
--no-check-certificateflag to wget.I am changing the Component tag to "Base system" since this involves
drush_download_file(). Maybe "Core commands" or "PM" would be better, but I am pretty sure that "Make" is wrong.Comment #5
owen barton commentedIMHO passing --no-check-certificate is the incorrect approach, as it opens up the downloaded code to man-in-the-middle attacks - the better fix is to update the openssl root certificates on the server (normally via a package update, but can also be done manually). If this is a shared server (and the host refuses to update), I think you may still be able to do this by installing the certificates in a local directory and setting the SSL_CERT_DIR environment variable.
Comment #6
benjifisher@Owen Barton:
I admire your level of paranoia.
I am writing a drush script that downloads some code from GitHub. I suppose I can download the SSL cert from GitHub, but I am not sure how I can set environment variables in this context. I am willing to risk a man-in-the-middle attack.
Comment #7
owen barton commentedI am referring to the root SSL certificate collection normally provided as part of every operating system (including Windows, OS X, Linux), not the certificate for Github (or any specific server). The root certificates are used by clients as the basis for a chain of trust through certificate provider(s) and finally to the server you are trying to communicate with. The error you are getting is because these root certificates are missing/broken on the server you are using - this means that not just that wget for github won't work, but any outbound SSL connection (using OpenSSL) to any server via any means (git/https, wget, curl, php API requests etc) will fail. This seems like the kind of issue that is simply better to be fixed at the server level to me.
Comment #8
benjifisherThanks for all the advice so far.
From my Ubuntu web server, I tried
and it worked perfectly.
The problem is my Mac. (I have not tried yet from Windows.) I have no trouble with GitHub when using a web browser. I checked the CA using the Mac's GUI tool for managing certificates, and it is there. The problem seems to be that the command-line tools do not hook into the Mac certificates.
A Google search turns up these articles:
http://stackoverflow.com/questions/6565633/installing-curl-with-ssl-so-i...
http://loopkid.net/articles/2011/09/20/ssl-certificate-errors-on-mac-os-x
They suggest that the only way to solve the problem is by passing flags (
--ca-certificatefor wget or--cacertfor curl) or setting environment variables. I still do not know how to do that in the context of a drush-based installation script that I expect other people to use.Comment #9
benjifisherThis works on my Mac, but still does not address the portability issue I raised in #8.
The versions of curl installed by Apple and included with MAMP do not seem to be compiled with SSL support. The man page mentions the
--cacertoption, but the executable does not recognize it.I installed wget a long time ago using Fink, so the executable is /sw/bin/wget. I added
to /sw/etc/wgetrc. It would probably also work if I added it to ~/.wgetrc.
Maybe this will help someone else with the same setup. Maybe more recent ports of wget are configured better.
Comment #10
damd commentedOn cygwin, I had to install ca-certs and add this to ~/.wgetrc
ca-certificate = /cygdrive/c/cygwin/usr/ssl/certs/ca-bundle.crtComment #11
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to
closed (duplicate).Use our Github project for contributing code, or reporting bugs, or requesting features.