git提交和git ftp推入bitbucket管道

git提交和git ftp推入bitbucket管道,git,bitbucket-pipelines,git-ftp,Git,Bitbucket Pipelines,Git Ftp,我想在bitbucket管道中进行提交 我的YAML文件: image: wagnerstephan/bitbucket-git-ftp:latest pipelines: custom: init: - step: script: - apt-add-repository ppa:ondrej/php - apt-get update - apt-get install php7.0 -y

我想在bitbucket管道中进行提交

我的YAML文件:

image: wagnerstephan/bitbucket-git-ftp:latest

pipelines:
  custom:
    init:
    - step:
        script:
          - apt-add-repository ppa:ondrej/php
          - apt-get update
          - apt-get install php7.0 -y
          - php build/build.php
          - git add .
          - git commit -m "Minify"
          - git ftp init -vv --insecure -u "$FTP_USERNAME" -p "$FTP_PASSWORD" "ftp://$FTP_HOST"
    deploy:
    - step:
        script:
          - apt-add-repository ppa:ondrej/php
          - apt-get update
          - apt-get install php7.0 -y
          - php build/build.php
          - git add .
          - git commit -m "Minify"
          - git ftp push -vv --insecure -u "$FTP_USERNAME" -p "$FTP_PASSWORD" "ftp://$FTP_HOST" --all
  branches:
    master:
    - step:
        name: Deploy production
        deployment: production
        script:
          - apt-add-repository ppa:ondrej/php
          - apt-get update
          - apt-get install php7.0 -y
          - php build/build.php
          - git add .
          - git commit -m "Minify"
          - git ftp push -vv --insecure -u "$FTP_USERNAME" -p "$FTP_PASSWORD" "ftp://$FTP_HOST"
build.php
缩小所有JS和CSS文件

第一步(git init)运行没有问题,创建了
.git ftp.log
文件

但下一个主推送运行时,(git ftp push…命令)会写入:

Thu Mar 19 21:13:00 UTC 2020: Last deployed SHA1 for ftp.[my_ftp].com/ is 23ec1b6f290ff9dd11d5ff700718ed121c54709c.
Thu Mar 19 21:13:00 UTC 2020: Unknown SHA1 object, make sure you are deploying the right branch and it is up-to-date.
Do you want to ignore and upload all files again? [y/N]: Thu Mar 19 21:13:00 UTC 2020: Aborting...

好像最新的提交ID不好。

管道克隆的存储库似乎不完整。类似于git clone--depth 1,即克隆中没有足够的提交。尝试重新配置管道以进行更深的初始克隆,或者自己深化克隆。如何在管道中进行git克隆?