1

我有

We were unable to enable quick deploy for your site because your GitHub token 
is invalid for this repository or has expired. Please refresh the token in
your Forge account profile's "Authentication" tab.

我做了它所说的但没有帮助。

下面是我的部署脚本:

cd /home/forge/default
git pull origin master
composer install --no-interaction --no-dev --prefer-dist
php artisan migrate --force

我在服务器上手动运行它,我得到了

 [Illuminate\Database\QueryException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
  ady exists (SQL: create table `users` (`id` int unsigned not null auto_incr
  ement primary key, `email` varchar(255) not null, `first_name` varchar(50)
  not null, `last_name` varchar(50) not null, `organization` varchar(255) not
   null, `reason` varchar(255) not null, `password` varchar(60) not null, `ro
  le` varchar(255) not null default 'reg', `activation_code` varchar(255) not
   null, `status` tinyint not null default '0', `remember_token` varchar(100)
   null, `created_at` timestamp default 0 not null, `updated_at` timestamp de
  fault 0 not null) default character set utf8 collate utf8_unicode_ci)


  [PDOException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
  ady exists

我注释掉了表创建脚本,但仍然无法使用快速部署。

4

2 回答 2

0

当我们重命名我们的仓库时,我们得到了这个错误。我们必须单击 Forge 中显示“卸载存储库”的可怕红色按钮(我们还勾选了回滚迁移)。然后我们可以指定新的 repo 名称并激活 Quick Deploy。整个过程实际上花了两分钟,我们的网站已经备份。

于 2016-09-14T14:10:37.263 回答
0

我遇到了同样的问题,并发现 - 当我在暂存环境中使用新版本时 - 我已将部署分支更改为发布分支。由于这与我在部署脚本中提取的不同,因此由于某种原因它产生了上述错误。匹配两个分支确实立即解决了问题。

于 2020-04-15T10:47:12.727 回答