Nodejitsu Deploy Private Github Repo Error

nodejitsu Error 502 deploy:github:no_pkg_json

I’m trying to auto deploy my nodejs application from github to nodejitsu. I have already setup my webhook to nodejitsu and everything works fine when the github repository is public. Now I have made my github repo private i’m seeing an error when i commit changes.

Nodejitsu emails me the error:

Your application has failed to deploy.

Error 502 deploy:github:no_pkg_json: Unspecified error

Error: Failed to fetch `package.json`.Is this a private repo ?
    at Request._callback
(/opt/run / snapshot / package / lib / github.js: 100: 23)
    at Request.self.callback
(/opt/run / snapshot / package / node_modules / request / request.js: 129: 22)
    at Request.emit(events.js: 98: 17)
    at Request.
(/opt/run / snapshot / package / node_modules / request / request.js: 873: 14)
    at Request.emit(events.js: 117: 20)
    at IncomingMessage.
(/opt/run / snapshot / package / node_modules / request / request.js: 824: 12)
    at IncomingMessage.emit(events.js: 117: 20)
    at _stream_readable.js: 929: 16
    at process._tickCallback(node.js: 419: 13)

Full details may be seen via curl:

curl -u sdeering

When I try curl to output full details, it’s not helpful at all.

Further research states to use webhooks via command line to update your apps (fetch package.json).

Install latest jistu

npm install jitsu -g

Then enter the directory of your app

cd <dr>

Then prompt an update

jitsu apps update


Ok so we need to give access to nodejitsu to our private repo. We can do this by running the following with your username/password replaced.

curl -X POST -u sdeering -H "Content-type: application/json" --data '{ "credentials": "github-username:github-password" }'

Then when we click “test service” on our github webhooks page, it should now work.

The active snapshot should now update to the new version.


And the success email should come through.