问题
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