Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble deploying #9

Open
zalerner opened this issue Mar 5, 2015 · 5 comments
Open

Trouble deploying #9

zalerner opened this issue Mar 5, 2015 · 5 comments

Comments

@zalerner
Copy link

zalerner commented Mar 5, 2015

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

@DennisDreissen
Copy link
Contributor

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

@jcpeden
Copy link

jcpeden commented Mar 20, 2015

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

@DennisDreissen
Copy link
Contributor

What issues are you having with Bitbucket?

@jcpeden
Copy link

jcpeden commented Mar 23, 2015

Outlined here:

#10 (comment)

@zalerner
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants