pocketarc / git-deploy-php

git-deploy-php is a simple php-based tool that deploys your Git repositories to FTP/SFTP servers, and keeps them updated automatically.
http://brunodebarros.github.io/git-deploy-php
292 stars 45 forks source link

FTP Password #43

Closed edukarma closed 9 years ago

edukarma commented 10 years ago

Git-deploy cannot handle passwords with special symbols. I had an FTP password like this:

hU[Irp:Eb}Ov:uC#

It would simply fail to login.

pocketarc commented 10 years ago

Did you wrap it with quotes?

edukarma commented 10 years ago

No I did not. Should I?

pocketarc commented 10 years ago

Yes; that's standard for .ini files, to the best of my knowledge (and the file is parsed with PHP's parse_ini_file(), it's not some custom function). So you'd have:

pass = "hU[Irp:Eb}Ov:uC#"

And that should work without any problems. Let me know.

Reference: http://php.net/parse_ini_file

Note: If a value in the ini file contains any non-alphanumeric characters it needs to be enclosed in double-quotes (").

edukarma commented 10 years ago

Aha - that explains. Thanks!

Can I have multiply deploys? Like for development, staging, production, etc?

pocketarc commented 10 years ago

Yes, of course you can!

There was documentation for that back in v1, but in v2 it changed and I haven't updated the docs yet, I'm afraid.

To do it, just use -d staging.ini or -d production.ini. By default, it's deploy.ini. You can also specify it on its own, after any other options. For example: php git-deploy production.ini

Hejprint commented 9 years ago

@edukarma, @BrunoDeBarros Is this multi deploys work good with merging?

pocketarc commented 9 years ago

What do you mean about merging?

Hejprint commented 9 years ago

@BrunoDeBarros Is it deploying only in commits or in merging also?

A deploy is sent when commit is sent. But is it also sent when I will do a merge to the branch that is observed?

For example: The observed branch is production. I am merging branch feat/super-functionality to production. Is there a "deploy trigger" for sth like this?

pocketarc commented 9 years ago

A merge is a commit. After merging, just run php git-deploy and it'll deploy everything.