yii2的Bitbucket管道配置。需要github令牌吗
我尝试在我的项目中使用bitbucket管道,我使用简单配置:yii2的Bitbucket管道配置。需要github令牌吗,yii2,composer-php,bitbucket,bitbucket-pipelines,Yii2,Composer Php,Bitbucket,Bitbucket Pipelines,我尝试在我的项目中使用bitbucket管道,我使用简单配置: image: phpunit/phpunit:5.0.3 pipelines: default: - step: script: # Modify the commands below to build your repository. - composer --version - phpunit --version - composer gl
image: phpunit/phpunit:5.0.3
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- composer --version
- phpunit --version
- composer global require "fxp/composer-asset-plugin:^1.2.0"
- composer install
- php init --env=Development --overwrite=All
但是,在composer intall阶段,我需要一个github令牌,因为yii2在github上。
那么,如何使用此配置运行带令牌的composer?为composer设置一些配置就足够了。要使用的命令的链接:。简单步骤:
composer config-g github-oauth.github.com
是您的令牌
现在应该配置它,Composer现在应该允许您安装。创建github帐户并从中生成令牌github@Nitin当然可以,但是如何在docker容器中使用它呢?好的,它可以工作,接下来我尝试初始化yii应用程序,在没有控制台对话框的情况下使用命令“php init--env=Development--overwrite=All”进行初始化,但我有一条消息:“是否要设置连接到数据库的参数?[是|否]“。如何在没有db连接对话框的情况下初始化应用程序?取决于您使用的Yii2类型。如果您使用的是高级,那么在
environments>dev>common>config>main local.php
或config>db.php
中设置数据库连接(如果您使用的是简单类型)。我不知道这是否正是你想要的,但一旦你建立了连接,就不应该要求你提供数据库的详细信息。是的,a使用高级类型,所以我需要为bb再设置一个环境,对吗?这可能会有帮助,谢谢。