himynameisjonas / heroku-deployer Goto Github PK
View Code? Open in Web Editor NEWDeploy to heroku with a github webhook
Deploy to heroku with a github webhook
When using a GitHub web hook, you get pinged for pretty much everything. This includes new branches, commits to non-master branches, etc. I suggest we filter out everything but commits to master.
I fail to make this run. No matter what I do, I always receive the following error:
Name of heroku-deployer app: "my-cool-heroku-deployer"
Webhook Secret: "my-cool-secret"
Name of Heroku app which will host the Jekyll-generated website: "my-cool-heroku-website"
2014-11-27T18:36:29.121252+00:00 app[web.1]: I, [2014-11-27T18:36:29.121122 #2] INFO -- : correct secret
2014-11-27T18:36:29.127470+00:00 app[web.1]: 192.30.252.45 - - [27/Nov/2014 18:36:29] "POST /deploy/my-cool-heroku-deployer/my-cool-secret HTTP/1.1" 200 5 0.0068
2014-11-27T18:36:29.353610+00:00 app[web.1]: sh: 1: cd: can't cd to repos/1915209948
2014-11-27T18:36:29.327324+00:00 app[web.1]: sh: 1: cd: can't cd to repos/1915209948
2014-11-27T18:36:29.356772+00:00 app[web.1]: I, [2014-11-27T18:36:29.356713 #2] INFO -- : done
2014-11-27T18:36:29.121361+00:00 app[web.1]: I, [2014-11-27T18:36:29.121297 #2] INFO -- : app exists
2014-11-27T18:36:29.340540+00:00 app[web.1]: D, [2014-11-27T18:36:29.340372 #2] DEBUG -- :
2014-11-27T18:36:29.204591+00:00 app[web.1]: Cloning into 'repos/1915209948'...
2014-11-27T18:36:29.308511+00:00 app[web.1]: Permission denied (publickey).
2014-11-27T18:36:29.137571+00:00 heroku[router]: at=info method=POST path="/deploy/my-cool-website/my-cool-secret" host=my-cool-heroku-deployer.herokuapp.com request_id=34080e38-7ed4-4522-9ab4-2e353b0c2e46 fwd="192.30.252.45" dyno=web.1 connect=8ms service=31ms status=200 bytes=281
2014-11-27T18:36:29.302556+00:00 app[web.1]: Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
2014-11-27T18:36:29.309724+00:00 app[web.1]: Please make sure you have the correct access rights
2014-11-27T18:36:29.309726+00:00 app[web.1]: and the repository exists.
2014-11-27T18:36:29.311530+00:00 app[web.1]: D, [2014-11-27T18:36:29.311328 #2] DEBUG -- :
2014-11-27T18:36:29.129562+00:00 app[web.1]: I, [2014-11-27T18:36:29.129493 #2] INFO -- : cloning
2014-11-27T18:36:29.327759+00:00 app[web.1]: D, [2014-11-27T18:36:29.327553 #2] DEBUG -- :
2014-11-27T18:36:29.309722+00:00 app[web.1]:
2014-11-27T18:36:29.309719+00:00 app[web.1]: fatal: Could not read from remote repository.
2014-11-27T18:36:29.327809+00:00 app[web.1]: I, [2014-11-27T18:36:29.327766 #2] INFO -- : fetching master
2014-11-27T18:36:29.340118+00:00 app[web.1]: sh: 1: cd: can't cd to repos/1915209948
2014-11-27T18:36:29.342363+00:00 app[web.1]: I, [2014-11-27T18:36:29.341389 #2] INFO -- : pushing
2014-11-27T18:36:29.355823+00:00 app[web.1]: fatal: Not a git repository (or any parent up to mount point /app)
2014-11-27T18:36:29.355826+00:00 app[web.1]: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
2014-11-27T18:36:29.356530+00:00 app[web.1]: D, [2014-11-27T18:36:29.356357 #2] DEBUG
It looks like my-cool-heroku-app is being notified properly by GitHub that a new push to the repository has happened. But then it fails to access the repository. My guess is that one of these:
I just cannot figure out which one it is.
There are a few questions I have concerning the installation instructions, maybe this will help.
You never mention that I have to push the files deploy_rsa and my-cool-heroku-website_rsa to my-cool-heroku-deployer. Shouldn't I add
, commit
and git push heroku master
them to my_cool_heroku_deployer after step 4? This is not mentioned. Otherwise, how are $(cat deploy_rsa)
and $(cat my-cool-heroku-website_rsa)
supposed to work?
Concerning my-cool-website_GIT_REPO
. If the repository belongs to an organization, what is the correct value for this variable? Is it ssh://[email protected]/<org-name>/<repo-name>.git
? I'm confused a little because you say it should be ssh://[email protected]/github_username/github_repository.git
, so I suppose in this situation github_username is actually rather organization_name.
The webhook settings have changed slightly. Is this still correct https://give_deployer_a_name.herokuapp.com/deploy/example_app/super_secret_string
or do I have to drop the last part super_secret_string and provide it extra in the field Secret?
Any help is appreciated, thanks.
Being new to Heroku, I'm not really sure how this happened, but the web hook from github did two things, when I tested it:
Going to try and figure out how this was possible…
I did everything in the Readme, however the heroku logs say that the deployer isn't cloning the repo properly.
I get this kind of error which leads me to believe that it is a cloning issue:
2013-11-11T04:49:05.734526+00:00 app[web.1]: Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
2013-11-11T04:49:05.859444+00:00 app[web.1]: Permission denied (publickey).
2013-11-11T04:49:05.863642+00:00 app[web.1]: fatal: The remote end hung up unexpectedly
2013-11-11T04:49:05.870483+00:00 app[web.1]: D, [2013-11-11T04:49:05.870252 #2] DEBUG -- : Initialized empty Git repository in /app/repos/2518977767/.git/
After that, the errors mostly say that it can't cd into the directory.
2013-11-11T04:49:05.890122+00:00 app[web.1]: cd: 1: can't cd to repos/2518977767
2013-11-11T04:49:05.890920+00:00 app[web.1]: D, [2013-11-11T04:49:05.890728 #2] DEBUG -- :
2013-11-11T04:49:05.891353+00:00 app[web.1]: I, [2013-11-11T04:49:05.891266 #2] INFO -- : fetching
2013-11-11T04:49:05.914706+00:00 app[web.1]: cd: 1: can't cd to repos/2518977767
2013-11-11T04:49:05.920451+00:00 app[web.1]: D, [2013-11-11T04:49:05.920210 #2] DEBUG -- :
2013-11-11T04:49:05.921360+00:00 app[web.1]: I, [2013-11-11T04:49:05.921227 #2] INFO -- : pushing
2013-11-11T04:49:05.954139+00:00 app[web.1]: fatal: Not a git repository (or any of the parent directories): .git
2013-11-11T04:49:05.941644+00:00 app[web.1]: cd: 1: can't cd to repos/2518977767
2013-11-11T04:49:05.957591+00:00 app[web.1]: D, [2013-11-11T04:49:05.957277 #2] DEBUG -- :
2013-11-11T04:49:05.957752+00:00 app[web.1]: I, [2013-11-11T04:49:05.957672 #2] INFO -- : done
Any help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.