git-deploy icon indicating copy to clipboard operation
git-deploy copied to clipboard

Trouble deploying

Open zalerner opened this issue 9 years ago • 5 comments

Hi!

I've been having some trouble getting the script to deploy even a public GitHub repo. I've been committing to this test repository without any luck: https://github.com/zalerner/deploy-test

The webhook appears to be delivering its payload based on the green check mark. Upon closer inspection it's getting a 200 response with this in the body:

<h1>No payload present</h1><p>A GitHub POST payload is required to deploy from this script.</p>

I was wondering if this was potentially a configuration or permissions issue on my end. Here's my config:

<?php

$repos = array(
        'deploy-test' => array(
          'branch' => 'master',
      'remote' => 'origin',
          'path' => '/home/danceint/public_staging/gh-deploy/put-code-here/'
        )
);

define( 'DEPLOY_LOG_DIR', dirname( __FILE__ ) );

require_once 'inc/class.deploy.php';

The path is definitely right, but I wasn't sure about how much of the repo name was required. Unfortuantely, the deployments.log file isn't getting written to, and these initial PHP errors don't seem to be appearing anymore:

[04-Mar-2015 18:11:10 CST6CDT] PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:13:21 CST6CDT] PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:15:31 CST6CDT] PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[04-Mar-2015 18:16:48 CST6CDT] PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

This is on a shared hosting environment where git is installed and I'm able to push/pull without any difficulty. Everything is owned by the primary FTP/SSH user. Any insight into what's happening would be huge!

Thanks for your time! Zack

zalerner avatar Mar 05 '15 01:03 zalerner

Hey there,

Are you still having problems with the payload? I forked this project a couple hours ago and made some changes to it, everything works perfectly fine for me now. I also added support for GitHub's secret to validate the payload.

https://github.com/DennisDreissen/git-deploy

DennisDreissen avatar Mar 19 '15 23:03 DennisDreissen

I'm struggling, but using Bitbucket rather than Github...what did you change?

jcpeden avatar Mar 20 '15 10:03 jcpeden

What issues are you having with Bitbucket?

DennisDreissen avatar Mar 20 '15 15:03 DennisDreissen

Outlined here:

https://github.com/lkwdwrd/git-deploy/issues/10#issuecomment-84921651

jcpeden avatar Mar 23 '15 09:03 jcpeden

@DennisDreissen ended up using a script an engineer developed internally, but thanks for checking in on this. Will definitely try it again in the future.

zalerner avatar Mar 25 '15 20:03 zalerner