SPECIAL OFFER: Only $59 for access to everything in OSTraining for 1 year! You save $85!  1
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Help with Drush SSH keys

3 years 4 months ago #124720 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Daniel,

Hmmm...

I just looked at Centos. It is a Linux variant. I really don't want to install anything like that on my computer. I'm already busy transitioning from Win 7 to Win 10 and trying to keep my web site, columbiablooms.org, running.

I am the admin team. I am a one-man shop. As I may have written in an earlier post, I have been programming computers since 1970, but this is my first time to get deep into creating a web site.

What I hope you can do for me in a tutorial is to replace ADD (since Drush apparently does not work well with it) with another Windows stack where Drush will work on my Win 7 computer.

Sorry if there was a misunderstanding ...

Sam

Please Log in to join the conversation.

3 years 4 months ago #124722 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys
Hi Sam,

The plan was to set up a dev environment inside a container for you to use. You would still be on windows. There are other tools that simply the process but I think you will find they have flaws as well. You are only going to get a limited amount of support with windows applications.

I'll see if I can find a slightly simpler approach for you.

Thanks,
Daniel

Please Log in to join the conversation.

3 years 4 months ago #124723 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Daniel,

What about WAMP ( www.wampserver.com/en/ ) as an alternative to ADD? Would Drush be fully functional with it? (If it works I'll need help transitioning from ADD to WAMP.)

Sam

Please Log in to join the conversation.

3 years 4 months ago #124724 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys
Hi Sam,

You could try WAMP is doesn't include drush so you would have to set that up separately I guess it is worth a try.

Thanks,
Daniel

Please Log in to join the conversation.

3 years 4 months ago #124725 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
I've set up Drush. Surely I won't have to do it again?

Can you find out if I'll run into the same problem with Drush as I have now with ADD?

Thanks,
Sam

Please Log in to join the conversation.

3 years 4 months ago #124730 by Nick
Replied by Nick on topic Help with Drush SSH keys
Hi Sam,

with another Windows stack where Drush will work on my Win 7 computer.


By the way, according to Drush's documentation:

Drush on Windows is not recommended...


Source:
www.drush.org/en/master/install-alternative/#windows

So my guess is that you might have a tough time with Drush on Windows and run into some rabbit holes. Some features will work, but others might issues.

That being said, we'd still be happy to help.

I've set up Drush. Surely I won't have to do it again?


You won't have to install it again.

Can you find out if I'll run into the same problem with Drush as I have now with ADD?

Since it's dealing with the ssh keys, yes, it likely would. But it's worth double checking.

We'll dig deeper and see if can find a solution. Expect a reply soon.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #124733 by Nick
Replied by Nick on topic Help with Drush SSH keys
Hi Sam,

Go to:
(x86)\DevDesktop\drush\vendor\drush\drush\drushrc.php

And put this line in there:
$options['ssh-options'] = '-o PasswordAuthentication=no -i C:\users\sam\.ssh\id_rsa'

Let us know if that works.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #124736 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Hi Nick,

This is interesting. No error messages this time, but I expected status information from bluehost. I got my local system instead. What does this mean?

drush @prod status
alaises in devdesktop/drush/vendor/drush/drush PHP executable : php.exe

PHP configuration : "C:\Program Files (x86)\DevDesktop\php5_5\php.ini"
PHP OS : WINNT
Drush script : C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\drush.php
Drush version : 8.0.0
Drush temp : C:\Users\Sam\AppData\Local\Temp
directory
Drush : "C:\Program Files
configuration (x86)\DevDesktop\drush\vendor\drush\drush\drushrc.php"
Drush alias files : "C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\includes/../a
liases.drushrc.php"

There was no id_rsa file located at C:\Users\Sam\.ssh. I copied the one I created earlier from C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.ssh to C:\Users\Sam\.ssh.

Sam

Please Log in to join the conversation.

3 years 4 months ago #124754 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys
Hi Sam,

It looks like a conflict issue.

PHP configuration : "C:\Program Files (x86)\DevDesktop\php5_5\php.ini" Is refering to your ADD setup.

There was no id_rsa file located at C:\Users\Sam\.ssh. I copied the one I created earlier from C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.ssh to C:\Users\Sam\.ssh.

That will only work if you copy both parts of the ssh key. This sounds like a conflict in your having it set up outside of ADD as well as in ADD.

Thanks,
Daniel
The following user(s) said Thank You: SamStamport

Please Log in to join the conversation.

3 years 4 months ago #124757 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Hi Daniel,

Thanks for the help. Let's don't close this problem right now, but I have a priority project that just stepped in front of this one that I have to deal with. I will get back with you soon.

Sam

Please Log in to join the conversation.

3 years 4 months ago #124767 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Hi Sam,
Let us know how things goes, and if you need more assistance.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #124962 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
OK.

I fixed the SSH key problem by copying the public key.

If I change php.ini to point to my server wouldn't that cause "drush status" for my local computer to break?

Sam

Please Log in to join the conversation.

3 years 4 months ago #124967 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys
Hi Sam,

I'm not sure why you want to do that but it shouldn't break drush status.

Thanks
Daniel

Please Log in to join the conversation.

3 years 4 months ago #124972 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Hi Daniel,

Well, in your post #124754 you seem to be saying that php.ini should be changed.

The bottom line is that I'm in an area where I can find little documentation/tutorials/videos about setting up aliases so that they work on Windows.

Maybe I should just give up on Windows and install a VM. I'm afraid it will run like a dog on my current computer with 4 GB RAM, 64-bit Windows, & a dual-core at 2.5 GHz. I'm already paging like crazy with the ADD server running and all the ancillary stuff like PowerShell ISE, Komodo, etc.

Sam

Please Log in to join the conversation.

3 years 4 months ago #124976 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys
Hi Sam,

Yeah VMs are not so great for low spec systems You completely go to linux and have a better dev experience but that might be a big jump for you.

Or alternatively you could try and find some super cheap host to set it up on.

If you start editing your DevDesktop php.ini you could end up with all sorts of issues.

Have you run any maintenance on your pc to try and speed it up?

Could you list your full system spec and what maintenance you have tried maybe I can give a little more advise :)

Thanks
Daniel

Please Log in to join the conversation.

3 years 4 months ago #124989 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Hi Daniel,

You've offered some good suggestions over the last few days and I've tried them, but drush still does not work properly. Rather than continue down this path I think what I need now is a tutorial for setting up drush on Windows. Do you have an experienced person at your organization who knows all the ins & outs of working with Drupal on Windows?

Thanks,
Sam

Please Log in to join the conversation.

3 years 4 months ago #125006 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Hi Sam,

We have a video that probably was already suggested to you about installing Drush in Windows.

Your situation seems unique due the conflicts involved, and may require to look for other solutions.

Let us know if we can help you in something else

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #125021 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
I'll check out the video.

Thanks,
Sam

Please Log in to join the conversation.

3 years 4 months ago #125024 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Sounds good.

Have a great weekend, Sam!

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #125043 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
Hi,

In the first part of the video Brian Lewis says that Drush is pre-installed with ADD so I decided to backup my dev environment and re-install ADD. ADD re-install worked fine and here's the result.

Using ADD command prompt window -

(The first two lines are print commands that I inserted for alias debugging.)

C:\Users\Sam\Sites\devdesktop\bluehostclone>drush status
myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostcl
one/sites/default
WD rules: Cache rebuild lock hit: event_init [warning]
Drupal version : 7.43
Site URI : http://bluehostclone
Database driver : mysql
Database hostname : 127.0.0.1
Database port : 33067
Database username : drupaluser
Database name : bluehostclone
Drupal bootstrap : Successful
Drupal user :
Default theme : outreach
Administration theme : seven
PHP executable : php.exe
PHP configuration : "C:\Program Files (x86)\DevDesktop\php5_5\php.ini"
PHP OS : WINNT
Drush script : C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\drush.php
Drush version : 8.0.5
Drush temp directory : C:\Users\Sam\AppData\Local\Temp
Drush configuration : "C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\drushrc.ph
p"
Drush alias files : c:\users\sam\sites\devdesktop\bluehostclone\sites\al
l\drush/myaliases.aliases.drushrc.php
c:\users\sam\sites\devdesktop\bluehostclone\sites\de
fault/aliases.drushrc.php
C:\Users\Sam\Sites\devdesktop\bluehostclone/sites/al
l/drush/myaliases.aliases.drushrc.php
Install profile : openoutreach
Drupal root : C:\Users\Sam\Sites\devdesktop\bluehostclone
Drupal Settings File : sites/default/settings.php
Site path : sites/default
File directory path : sites/default/files
Private file : backups
directory path
Temporary file : /tmp
directory path

Using Windows Power Shell ISE -

myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/default
Drupal version : 7.43
Site URI : http://bluehostclone
Database driver : mysql
Database hostname : 127.0.0.1
Database port : 33067
Database username : drupaluser
Database name : bluehostclone
Drupal bootstrap : Successful
Drupal user :
Default theme : outreach
Administration theme : seven
PHP executable : php.exe
PHP configuration : "C:\Program Files (x86)\DevDesktop\php5_5\php.ini"
PHP OS : WINNT
Drush script : C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\drush.php
Drush version : 8.0.5
Drush temp directory : C:\Users\Sam\AppData\Local\Temp
Drush configuration : "C:\Program Files
(x86)\DevDesktop\drush\vendor\drush\drush\drushrc.ph
p"
Drush alias files : c:\users\sam\sites\devdesktop\bluehostclone\sites\al
l\drush/myaliases.aliases.drushrc.php
c:\users\sam\sites\devdesktop\bluehostclone\sites\de
fault/aliases.drushrc.php
C:\Users\Sam\Sites\devdesktop\bluehostclone/sites/al
l/drush/myaliases.aliases.drushrc.php
Install profile : openoutreach
Drupal root : C:\Users\Sam\Sites\devdesktop\bluehostclone
Drupal Settings File : sites/default/settings.php
Site path : sites/default
File directory path : sites/default/files
Private file : backups
directory path
Temporary file : /tmp
directory path

As you can see the results appear to be the same.

Results with Git Bash -

Sam@Win7Prod MINGW64 ~
$ drush status
Directory [error]
C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.drush\cache\default
exists, but is not writable. Please check directory permissions.
PHP executable : php
PHP configuration : "C:\Program Files (x86)\Drush\Php\php.ini"
PHP OS : WINNT
Drush version : 6.0
Drush configuration :
Drush alias files :

Directory [error]
C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.drush\cache\usage
exists, but is not writable. Please check directory permissions.

Sam@Win7Prod MINGW64 ~
$ cd "c:\users\sam\sites\devdesktop\bluehostclone"

Sam@Win7Prod MINGW64 /c/users/sam/sites/devdesktop/bluehostclone
$ drush status
Directory [error]
C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.drush\cache\default
exists, but is not writable. Please check directory permissions.
PDO::__construct(): [2002] No connection could be made because the [warning]
target machine actively (trying to connect via tcp://localhost:3306)
environment.inc:523
Drupal version : 7.43
Site URI : http://bluehostclone
Database driver : mysql
Database username : columck5
Database name : columck5_dr9626
Default theme : garland
Administration theme : garland
PHP executable : php
PHP configuration : "C:\Program Files (x86)\Drush\Php\php.ini"
PHP OS : WINNT
Drush version : 6.0
Drush configuration :
Drush alias files : c:\users\sam\sites\devdesktop\bluehostclone\sites\al
l\drush/myaliases.aliases.drushrc.php
c:\users\sam\sites\devdesktop\bluehostclone\sites\de
fault/aliases.drushrc.php
C:/users/sam/sites/devdesktop/bluehostclone/sites/al
l/drush/myaliases.aliases.drushrc.php
Drupal root : C:/users/sam/sites/devdesktop/bluehostclone
Site path : sites/default
File directory path : sites/default/files

Directory [error]
C:\Users\Sam\Sites\devdesktop\columbiablooms-dev\.drush\cache\usage
exists, but is not writable. Please check directory permissions.

Sam@Win7Prod MINGW64 /c/users/sam/sites/devdesktop/bluehostclone
$

The above results from Git Bash are similar, but I had to change the directory.

Running "drush @prod status" on Win PowerShell returned the above instead of status from bluehost.

Running "drush @prod status" on the ADD shell returned -

C:\Users\Sam\Sites\devdesktop\bluehostclone>drush @prod status
myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/default
myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/defaultmyaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/default
You are about to execute 'status' non-interactively (--yes forced) on all of the following targets:
@myaliases.prod
@prod
@myaliases.prod
@prod
Continue? (y/n): y
myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/default
myaliases in devdesktop/bluehostclone/sites/all/drush
alaises in users/sam/sites/devdesktop/bluehostclone/sites/default
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted
(tried to allocate 32 bytes) in C:\Program Files (x86)\DevDesktop\drush\vendor\drush\drush\includes\s
itealias.inc on line 253
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in C:\Prog
ram Files (x86)\DevDesktop\drush\vendor\drush\drush\includes\sitealias.inc on line 253

What does the above mean? (Git Bash returned the same messages.)

I'm guessing that in the process of trying to get drush to work properly that I've managed to muck up my entire file structure on Windows. Unfortunately, I don't know how to fix it. There appears to be nothing like Git to fix this problem.

Thanks,
Sam

Please Log in to join the conversation.

3 years 4 months ago #125046 by Daniel Pickering
Replied by Daniel Pickering on topic Help with Drush SSH keys

SamStamport wrote: Hi,
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted
Thanks,
Sam


Your Dev does not have sufficient levels of ram available.

This could be a limitation of your machine or lack of maintenance you can ajust the level of memory used but I would be wary of allocating more than you actually have.

Thanks
Daniel

Please Log in to join the conversation.

3 years 4 months ago #125053 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
memory_limit = -1 in my php.ini file. Doesn't this tell php to use as much as it wants?

When you refer to lack of maintenance are you saying my Win 7 machine does not have current fixes from Microsoft (it does) or maintenance of some other component. If you are talking about another component please specify. (ADD is current.)

Why are you wary of allocating more memory than I actually have? My Win 7 machine is 64-bit making virtual memory almost limitless.

Please Log in to join the conversation.

3 years 4 months ago - 3 years 4 months ago #125070 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Hi Sam,
I noticed a non common setup there.

Change this:
memory_limit = -1
to this:
memory_limit = 32M

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #125076 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
OK.

I changed memory_limit to 32M and got the following from the ADD command prompt.


C:\Users\Sam\Sites\devdesktop\bluehostclone>drush @prod status
myaliases in devdesktop/bluehostclone/sites/all/drushalaises in users/sam/sites/devdesktop/bluehostcl
one/sites/defaultmyaliases in devdesktop/bluehostclone/sites/all/drushalaises in users/sam/sites/devd
esktop/bluehostclone/sites/defaultmyaliases in devdesktop/bluehostclone/sites/all/drushalaises in use
rs/sam/sites/devdesktop/bluehostclone/sites/defaultYou are about to execute 'status' non-interactivel
y (--yes forced) on all of the following targets:
@myaliases.prod
@prod
@myaliases.prod
@prod
Continue? (y/n): y
myaliases in devdesktop/bluehostclone/sites/all/drushalaises in users/sam/sites/devdesktop/bluehostcl
one/sites/defaultmyaliases in devdesktop/bluehostclone/sites/all/drushalaises in users/sam/sites/devd
esktop/bluehostclone/sites/defaultPHP Fatal error: Allowed memory size of 268435456 bytes exhausted
(tried to allocate 36 bytes) in C:\Program Files (x86)\DevDesktop\drush\vendor\drush\drush\includes\e
nvironment.inc on line 608

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 36 bytes) in C:\Prog
ram Files (x86)\DevDesktop\drush\vendor\drush\drush\includes\environment.inc on line 608

C:\Users\Sam\Sites\devdesktop\bluehostclone>

What should I do next to solve this problem?

Also, what is Daniel referring to in his last post:

When you refer to lack of maintenance are you saying my Win 7 machine does not have current fixes from Microsoft (it does) or maintenance of some other component. If you are talking about another component please specify. (ADD is current.)

Why are you wary of allocating more memory than I actually have? My Win 7 machine is 64-bit making virtual memory almost limitless.

Please Log in to join the conversation.

3 years 4 months ago - 3 years 4 months ago #125090 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
It requires to look for other alternatives, since there could be settings within your operative system involved that are beyond our support scope.

In addition, this documentation from the developer may help you to double check the memory limit settings .

Let us know if we can help you in something else

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #125149 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
I'm giving up on trying to get Drush to work to help me migrate from dev to prod. I'll just use phpMyAdmin for the database & Filezilla for the files.

Can you suggest a good web site for general help with Drupal running on Windows?

Please Log in to join the conversation.

3 years 4 months ago #125163 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Hi Sam,

Our classes should help you in that matter: www.ostraining.com/classes/drupal/

However, if you want to setup a new environment in your Windows computer, this class may help: www.ostraining.com/class/desktop-server/

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 4 months ago #125212 by SamStamport
Replied by SamStamport on topic Help with Drush SSH keys
The desktop server video seems to focus on Wordpress instead of Drupal.

I've found XAMPP, Acquia Dev Desktop, MAMP, & Bitnami as options for starting over. (There are probably others that compete with Bitnami that I am unaware of.)

Based on what you have learned about me which of these would you recommend?

Please Log in to join the conversation.

3 years 4 months ago #125216 by Valentin
Replied by Valentin on topic Help with Drush SSH keys
Hi Sam,

I recommend MAMP and XAMPP.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!