First, fix https://github.com/icyflame/node-gh-get-token/issues/1 Then use http://npmjs.com/package/gh-get-token