管道和git-ftp dirt存储库错误

时间:2017-10-11 20:53:27

标签: git ftp bitbucket bitbucket-pipelines

我正在尝试使用带有git-ftp的管道将文件推送到我的远程服务器。

错误讯息:

  

致命:脏的存储库:有未提交的更改。退出...

YML文件:

image: php:7.1.1

pipelines:
  default:
    - step:
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - apt-get -qq install git-ftp
          - git ftp init --user USER --passwd PASSWORD ftp://user@mydomain.tld@ftp.mydomain.tld/

我也试过了git ftp push但同样的事情。

没有未提交的更改,那么是什么给出了?

1 个答案:

答案 0 :(得分:0)

尝试调试使你的repo dirty添加到你的脚本图中的更改:

- git status -uno --porcelain

如果它返回了你的意思,那么在虚拟部署服务器中会发生一些变化。例如,某些文件在发送到服务器

时已损坏

png, jpeg, exe, jar, etc

为了修复它,将行添加到.gitattributes

*.exe binary *.jar binary *.png binary *.jpg binary *.gif binary