简体   繁体   English

当D8请求FTP凭据时,如何在Docker环境中的Drupal 8上安装模块。 (Devilbox)

[英]How to Install a module on Drupal 8 in a docker environment when D8 asks for FTP credentials. (Devilbox)

Technology used: - Windows 10 - Docker for Windows - DevilBox - Drupal 8.6.4 (Optional tech: cygwin to simulate linux commands). 使用的技术: - Windows 10 - 用于Windows的Docker - DevilBox - Drupal 8.6.4(可选技术:用于模拟linux命令的cygwin )。

When attempting to add a new module via URL or file upload in Drupal 8, the site asks me for FTP credentials and I have no more ideas where to find or set them. 当尝试通过Drupal 8中的URL或文件上载添加新模块时,该站点要求我提供FTP凭据,我没有更多想法在何处查找或设置它们。

I have a basic install of Devilbox running a brand new installation of Drupal 8. (Devilbox is a dockerized php stack). 我有一个基本安装的Devilbox运行Drupal 8的全新安装。(Devilbox是一个dockerized php堆栈)。

To solve my problem I bypassed finding the FTP credentials. 为了解决我的问题,我绕过了查找FTP凭据。

I will change the accepted answer to the first correct answer that is not mine and a bypass. 我会将接受的答案改为第一个正确答案,而不是我的和旁路。

First step, stopped using cygwin. 第一步,停止使用cygwin。 Started using Powershell. 开始使用Powershell。 Next step, navigate to the site's installation within devilbox: 下一步,导航到devilbox中的站点安装:

/devilbox/data/wwww/<yoursite>/htdocs

Then run command: 然后运行命令:

composer self-update
Followed by: composer require drupal/<drupal module to add> 其次是: composer require drupal/<drupal module to add>

Magically, module is under the modules page on drupal 8. 奇怪的是,模块位于drupal 8的模块页面下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM