Pipelines and git-ftp dirt repository error

一世执手 提交于 2021-01-28 09:22:19

问题


I am trying to use Pipelines with git-ftp to push files to my remote server.

Error message:

fatal: Dirty repository: Having uncommitted changes. Exiting...

YML file:

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/

I also tried git ftp push but same thing.

There are no uncommitted changes, so what gives?


回答1:


try to debug changes that made your repo dirty add line to your script graph:

- git status -uno --porcelain

If it returns you something this means, in virtual deploy server some changes happen. For example, some files was corrupted while sending to over server

png, jpeg, exe, jar, etc

in order to fix it add lines into .gitattributes

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



来源:https://stackoverflow.com/questions/46697367/pipelines-and-git-ftp-dirt-repository-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!