简体   繁体   中英

Pipelines and git-ftp dirt repository error

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM