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

Not running properly for me #63

Closed saurabhjain1592 closed 9 years ago

saurabhjain1592 commented 9 years ago

Warning: array_merge(): Argument #2 is not an array in phar:///Users/saurabhjain/Documents/workspace_ridorama/ridorama-backend/git-deploy/src/Config.php on line 75 Enter ftp password:

Fatal error: Class 'Brunodebarros\Gitdeploy\' not found in phar:///Users/saurabhjain/Documents/workspace_ridorama/ridorama-backend/git-deploy/src/Config.php on line 92

cfabrice commented 9 years ago

Same error here ! too bad...

cfabrice commented 9 years ago

here is my error:

iMacWonder-3:testdebarros f$ php git-deploy
PHP Warning:  array_merge(): Argument #2 is not an array in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 76

Warning: array_merge(): Argument #2 is not an array in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 76
Enter ftp password: 
PHP Notice:  Undefined index: skip in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 88

Notice: Undefined index: skip in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 88
PHP Notice:  Undefined index: scheme in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 92

Notice: Undefined index: scheme in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 92
PHP Fatal error:  Class 'Brunodebarros\Gitdeploy\' not found in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 93

Fatal error: Class 'Brunodebarros\Gitdeploy\' not found in phar:///Users/f/Desktop/testdebarros/git-deploy/src/Config.php on line 93
pocketarc commented 9 years ago

That's a strange error; thanks for letting me know. I'll be looking into it over the weekend if I get a chance, and I'll see if I can resolve it.

What version of PHP are you running?

cfabrice commented 9 years ago

Hello, Thank you for your answer ! it’s PHP 5.4 Fabrice

Le 5 nov. 2015 à 19:07, Bruno De Barros notifications@github.com a écrit :

That's a strange error; thanks for letting me know. I'll be looking into it over the weekend if I get a chance, and I'll see if I can resolve it.

What version of PHP are you running?

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-154140339.

pocketarc commented 9 years ago

I see what the problem is. Your deploy file is like this:

[ftp://example:password@example.com:21/path/to/installation]

Right? If that's the case, try using the normal way of specifying servers:

 [example]

 skip = false
 user = example
 pass = password
 host = example.com
 port = 21
 path = /path/to/installation
 passive = true
cfabrice commented 9 years ago

no, i’m using the normal way…

Le 9 nov. 2015 à 12:55, Bruno De Barros notifications@github.com a écrit :

I see what the problem is. Your deploy file is like this:

[ftp://example:password@example.com:21/path/to/installation]

Right? If that's the case, try using the normal way of specifying servers:

[example]

skip = false user = example pass = password
host = example.com port = 21 path = /path/to/installation passive = true — Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155044581.

pocketarc commented 9 years ago

What is your deploy.ini like? It looks like it's a problem with the deploy configs.

cfabrice commented 9 years ago

There you are…

skip = false user = BBBB pass = XXXXXX host = HHHH port = 21 path = /test passive = true

Le 9 nov. 2015 à 13:15, Bruno De Barros notifications@github.com a écrit :

What is your deploy.ini like? It looks like it's a problem with the deploy configs.

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155048634.

pocketarc commented 9 years ago

Do you not have a section header at the top? Like:

[ksudbtrv]

Notice that in my example I have [example] before the rest of the details.

cfabrice commented 9 years ago

you were right, I didn’t know it was useful… I’m not familiarized with .ini file. but nonetheless even with the header (i can name it as i want, correct ? or do i have to use the domain without the extension or the user as in your example?) I still get an error:

ERROR: Could not connect to ftp://user@http://domain.ch:21/web/path/otherpath

About my setting: my local repository is in a folder in my desktop folder (I’m on mac). I just have an index.html file at its root and your files (deploy.ini, git-deploy and the folder called tools), is this correct ? I cd in my folder with terminal and I typed php git-deploy. Correct ? Do I have to install something on the distant server as well ?

Le 9 nov. 2015 à 16:00, Bruno De Barros notifications@github.com a écrit :

Do you not have a section header at the top? Like:

[ksudbtrv] Notice that in my example I have [example] before the rest of the details.

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155087318.

pocketarc commented 9 years ago

You can use whatever you want.

It sounds like your host is wrong - it's not supposed to include http://.

Everything should work well, but it does look like the config file has some problems.

cfabrice commented 9 years ago

Ok, it ’s probably the server… because I’ve tried on another one (hosted at Sitegroud) and it worked perfectly. Thanks a lot ! The first time I deployed it uploaded all your files (I think it is because I git clone your repository and didn’t trash the .git folder and change the origin, correct !?) Should I have gitignored them first ? will they be ignore then ? Or should I have used deploy.ini as in your doc with adding as many lines like this ignore_files[] = file/toignore.txt ? Is there a way to ignore a whole folder and its content ? Thanks a lot anyway - I hope I can see why it is not working with the server as this is our main hosting provider.

Le 9 nov. 2015 à 17:27, Bruno De Barros notifications@github.com a écrit :

You can use whatever you want.

It sounds like your host is wrong - it's not supposed to include http://.

Everything should work well, but it does look like the config file has some problems.

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155114123.

pocketarc commented 9 years ago

Shot in the dark: Does your password have special characters? If it does, it should be wrapped with quotes. So:

skip = false
user = BBBB
pass = "XXXXXX"
host = HHHH

That might actually be the problem.

pocketarc commented 9 years ago

.git and any git-related files are ignored automatically, and it doesn't change anything in your original directory. git-deploy only includes files tracked in the repository, so any files that weren't committed into the repository won't be deployed (unless you use upload_untracked[]).

To ignore a whole folder, you can just do ignore_directories[] = path/to/folder. That should do it.

cfabrice commented 9 years ago

ok for the password: capital and small letters should dot it, right. but the user has an underscore (hosting obligation), could it be this ?

Le 9 nov. 2015 à 19:08, Bruno De Barros notifications@github.com a écrit :

Shot in the dark: Does your password have special characters? If it does, it should be wrapped with quotes. So:

skip = false user = BBBB pass = "XXXXXX" host = HHHH That might actually be the problem.

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155142974.

pocketarc commented 9 years ago

Try it with quotes. Also, add quotes to things like the host, the user, anything you think that might cause problems.

cfabrice commented 9 years ago

ok thanks a lot !

Le 9 nov. 2015 à 19:12, Bruno De Barros notifications@github.com a écrit :

Try it!

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155143968.

cfabrice commented 9 years ago

So cool ! it worked with quotes ;-)

Le 9 nov. 2015 à 19:13, Bruno De Barros notifications@github.com a écrit :

Try it with quotes. Also, add quotes to things like the host, the user, anything you think that might cause problems.

— Reply to this email directly or view it on GitHub https://github.com/BrunoDeBarros/git-deploy-php/issues/63#issuecomment-155144093.

pocketarc commented 9 years ago

Sweet, I'm glad to hear that! So really, the problem was just the configurations being incorrect. I'm closing this ticket.