Glavin001 / GitLab-Pages

:eyes: GitHub Pages, for GitLab.
MIT License
203 stars 30 forks source link

Can not enable project #27

Open tuxflo opened 8 years ago

tuxflo commented 8 years ago

I followed your guid in the Readme.md file and after starting the server, I'm able to see my projects. But when I click on the enable button nothing happens. Output from npm start on the commanlind:

 GET /stylesheets/style.css 304 1.647 ms - -
 GET /projects/37/enable 302 264.973 ms - 58

Any ideas how to start debugging? Also I can not see any Deploy Keys or Wehooks for the project I enabled, do they have to appear "normal" in the project settings view? I'm using a selfhosted gitlab server if that matters.

Thanks for helping, Flo

Glavin001 commented 8 years ago

You could take a look at https://github.com/Glavin001/GitLab-Pages/blob/master/routes/projects.js#L9-L43 and debug from there. Basically, it gets the SSH key as the deploy key, adds the deploy key to the project, and checks to make sure the deploy key was added successfully. You should be able to see the deploy key if you log into GitLab and look under that project's settings. The code is pretty straightforward so debugging should not be hard to do -- maybe there was a problem with your SSH key so it failed there. Maybe the GitLab API has changed and that is causing problems.

Let me know how debugging goes. It would be good to add in some additional error checking. I am no longer using GitLab so my development has slowed and I do not have a server to test on. I hope you can figure out how to make it work for you.

tuxflo commented 8 years ago

Hey Glavin thanks for the reply. I did some debuging and according to your Readme.md the Webhooks are created by Gitlab-Webhook but I couldn't see that package in the node_modules folder. So I did npm install gitlab-webhook and now I was able to enable the Project (Button turns red, Webhooks appear in the gitlab backend). However the site still does not get build :( After triggering the Webhook (manually or by doing a push to the gl-pages branch) the project gets cloned into the tmp folder (as configured in the _config.js file) but the jekyll build command is not executed.

Is it correct, that the webhook is handled by the gitlab-pages service too or do I have to create manually a file webhooks/pages.json and what should get in there?