Hello everybody.
I'm new to Drush, and I'm trying to work out how to get it to work from behind a proxy. Here's where I've got to so far:
1) I've installed Drupal 7.19 and it works
2) I've installed and configured the http_proxy module, and the update status report now works (yayyy!!!)
3) I've installed the very latest dev version of the Localisation update (l10n_update) module (which works with proxy variables) and can successfully download translations from localize.drupal.org, so that proxy call works also
4) I've installed Git and Drush
5) I can run Drush in the Git window and successfully execute commands like drush status and drush pm-info
So all in all I'm feeling pretty pleased with myself.
However, when I try drush pm-releases cck I get "Could not download project status information from [error]". Bummer. I have looked around a lot but cannot find any really up to date info on how to get this to work. Would it not be a good addition to your FAQ?

Comments

martink’s picture

Title: How can I get Drush to work from behind a proxy? » How can I get Drush to work from behind a proxy and on Windows XP?

I changed the title because I've dug a bit further into this.
First, I have found on the net something which suggests configuring the proxy in the wgetrc file (in my case this is C:\Program Files\Drush\GnuWin32\etc\wgetrc
I did this, but still no joy.
So I tried running drush with -v -d and got a comment returned to the effect that when executing "which wget", "which" is not recognised as an internal or external command. Any suggestions of ways round this would be welcome

martink’s picture

Crazy! I seemed to have fixed my own problem (didn't think I was capable of this). After some searching around, I discovered this post concerning the absence of a which command in Windows 7. Trouble is, I'm on XP and XP doesn't appear to have a "where" command either.
However, I am using the Git Bash shell, so I tried running "which wget" on that, took the reply, and then hacked C:\Documents and Settings\All Users\Application Data\Drush\includes\drush.inc to replace:

$use_wget = drush_shell_exec('which wget');

with:

$use_wget = 'C:\Program Files\Drush\GnuWin32\bin\wget';

I also located the C:\Program Files\Drush\GnuWin32\etc\wgetrc file and modified the proxy settings there.
I have now succeeded in downloading a module, so it seems everything is ok....

greg.1.anderson’s picture

Title: How can I get Drush to work from behind a proxy and on Windows XP? » Create a wrapper function for drush_shell_exec('which ...') for better cross-platform compatibility (e.g. Windows)
Version: 7.x-5.8 » 8.x-6.x-dev
Category: support » bug

If you can come up with a good way to find the wget executable that works on both Windows or Linux (or perhaps uses drush_is_windows() to conditionally-execute the Windows lookup code), then perhaps this could become a useful addition to Drush.

Note that there are a number of places where Drush uses where; ideally, they would all be changed to use a wrapper function that did the right thing for the platform.

(On another note, it's been a while since I used Drush on Windows, but it seems to me that Drush dl was working on XP under all three shells. Not sure what the disconnect is between my memory and your experiences. Maybe I only tested Win7. :?)

martink’s picture

If you can come up with a good way to find the wget executable that works on both Windows or Linux (or perhaps uses drush_is_windows() to conditionally-execute the Windows lookup code), then perhaps this could become a useful addition to Drush.

I'm afraid you're going way beyond my skillset there... I can hack things around and sometimes find semi-solutions, but that's about as far as I go.

greg.1.anderson’s picture

Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.

martin.knapp’s picture

Status: Closed (won't fix) » Closed (duplicate)
greg.1.anderson’s picture