Closed huglester closed 9 years ago
@Glavin001 hello, I would really like to start and try this project for our markdown docs.. Any help would be appreciated!
Thanks
The publicUrl
is actually used for the webhook -- see https://github.com/Glavin001/GitLab-Pages/search?q=publicurl&type=Code&utf8=%E2%9C%93
So it should not cause problems. I'm not sure why it's not working.
Could you run DEBUG=* npm start
and see what messages are displayed in the console?
Update: You should see app:server Listening on port 3000 +0ms
at the bottom of your logs when it finally settles.
Hello,
sorry for the delay, here what I came up with: I see output:
> node ./bin/www
express:router:route new / +0ms
express:router:layer new / +1ms
express:router:route get / +0ms
express:router:layer new / +0ms
express:router:route new /login +0ms
express:router:layer new /login +0ms
express:router:route post /login +1ms
express:router:layer new / +0ms
express:router:route new /logout +0ms
express:router:layer new /logout +0ms
express:router:route get /logout +0ms
express:router:layer new / +0ms
express:router:route new / +0ms
express:router:layer new / +0ms
express:router:route get / +0ms
express:router:layer new / +0ms
express:router:route new /:project_id/enable +1ms
express:router:layer new /:project_id/enable +0ms
express:router:route get /:project_id/enable +0ms
express:router:layer new / +0ms
express:router:route new /:project_id/disable +0ms
express:router:layer new /:project_id/disable +0ms
express:router:route get /:project_id/disable +0ms
express:router:layer new / +0ms
module.js:340
throw err;
^
Error: Cannot find module '../build/Debug/nodegit.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/huglester/Projects/pages/node_modules/nodegit/lib/nodegit.js:16:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! GitLab-Pages@0.1.0 start: `node ./bin/www`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the GitLab-Pages@0.1.0 start script.
npm ERR! This is most likely a problem with the GitLab-Pages package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls GitLab-Pages
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-41-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/huglester/Projects/pages
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/huglester/Projects/pages/npm-debug.log
npm ERR! not ok code 0
seems it can't find module: nodegit
I tried installing and watched for install process, I see this error:
/
> nodegit@0.4.1 install /home/huglester/Projects/pages/node_modules/nodegit
> node lifecycleScripts/install
[nodegit] Fetching binary from S3.
[nodegit] Failed to install prebuilt binary, building manually.
[nodegit] Making sure dependencies are available and native code is generated
[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node module.
{ [Error: Command failed: npm WARN prefer global js-beautify@1.5.6 should be installed with -g
npm WARN prefer global pangyp@2.2.1 should be installed with -g
npm ERR! Linux 3.16.0-41-generic
npm ERR! argv "node" "/home/huglester/Projects/pages/node_modules/nodegit/node_modules/.bin/npm" "install" "--ignore-scripts"
npm ERR! node v0.10.38
npm ERR! npm v2.11.2
npm ERR! path /home/huglester/.npm/js-yaml/3.0.1
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! Error: EACCES, mkdir '/home/huglester/.npm/js-yaml/3.0.1'
npm ERR! { [Error: EACCES, mkdir '/home/huglester/.npm/js-yaml/3.0.1']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/huglester/.npm/js-yaml/3.0.1',
npm ERR! parent: 'coveralls' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/huglester/Projects/pages/node_modules/nodegit/npm-debug.log
] killed: false, code: 3, signal: null }
undefined
debug@2.2.0 node_modules/debug
└── ms@0.7.1
I have also tried removing node_modules/ directory entirely and install with sudo npm install
- ut same error.
I also submitted issue to nodegit. I think it is more their error not GitlabPages?
Hello, thanks for the help.
With the help of DEBUG=* npm install I figured out I need to remove ./node_modules and ~/.npm folders.
This gave me nice results :)
thanks!
Glad to hear it's working!
Yeah, it is realy nice, thanks. But strange I am pressing 'Enable' but nothing happens...
Are there any pre-requirements for the repo?
Are there any pre-requirements for the repo?
Just that it is configured properly. See https://github.com/Glavin001/GitLab-Pages#step-2-configure-gitlab-pages-server
Try running with:
DEBUG=* npm start
and trace down all of the debug lines and see where it does not work. I would recommend adding some debug
lines in https://github.com/Glavin001/GitLab-Pages/blob/master/routes/projects.js#L9-L43 which is what handles the enabling of the repository.
If you are unable to figure out what's not working, please feel free to create a new issue with more information that would allow me help debug with you.
Hello, thans for help.
After some debugging I see, that hooks are beeing added!
Now I see that after test pull, I see that content is beeing deployed.. But 'Enable' button does not change to 'Disable'
Any idea where to look?:)))
Try refreshing the webpage. Hopefully it is something as easy as that. If not... :-1:
If that does not work then it could be a problem in how the check for if a repository is enabled or not works. Here is the view: https://github.com/Glavin001/GitLab-Pages/blob/master/views/index.handlebars#L13-L17 How it works is by checking if the deploy key and web hook has already successfully been added: https://github.com/Glavin001/GitLab-Pages/blob/master/routes/index.js#L28-L35
Hello @Glavin001
and thanks for helping :)
I have disabled this "IF" https://github.com/Glavin001/GitLab-Pages/blob/master/routes/index.js#L28
Because I have one added 'global' key, for all projeject, for easier pulling of projects. So now it verifies only the 'webhookUrl' - and then shows as Enabled/Disabled.
What do you think?
What was the main purpose to check if the is deploy key with 'Gitlab Pages'?
Thanks
Deploy keys have only read / pull permissions. GitLab Pages will have it's deploy key that it reuses on any applicable / enabled project. So I think maybe your issue was skipping this step: https://github.com/Glavin001/GitLab-Pages#step-1-create-your-deploy-key-pair
I will be keeping with the idea of Deploy key for GitLab Pages, so removing that if
statement is a no go.
Glad to hear we have at least narrowed it down to that one line though!
So you basicly upload this key. and then add this deployment key to every Project. Right?
Every project enabled for Gitlab pages, yes.
— Sent from Mailbox
On Mon, Jun 22, 2015 at 4:04 AM, huglester notifications@github.com wrote:
So you basicly upload this key. and then add this deployment key to every Project. Right?
Reply to this email directly or view it on GitHub: https://github.com/Glavin001/GitLab-Pages/issues/15#issuecomment-114024047
I think this issue can be closed. What you are describing now is not expected usage of GitLab Pages and/or should be made into another issue if it is still causing problems for you. Thanks!
Hello,
So I started the server. The
publicUrl
is set to http://IP:8081But when I go to IP, with port 8081 - I can't see anything, page not found. Other problem is, that
netstat -na
does not show, that port 8081 is listening.Any ideas? Thank you!