Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

Error creating project (Failed to setup repo: Bad status code: 401) #48

Closed felicienfrancois closed 8 years ago

felicienfrancois commented 8 years ago

I run strider behind a reverse proxy. Strider run on localhost:3000 (default settings) and my http server proxy it to http://mydomain.com (port 80)

Env variables set up:

SERVER_NAME="http://mydomain.com"
PLUGIN_GITHUB_HOSTNAME="http://mydomain.com"
PLUGIN_GITHUB_APP_ID="xxxxx"
PLUGIN_GITHUB_APP_SECRET="xxxx"

I can connect to github successfully and get back to strider with my project list, but when I click on "Add project, I get the following error:

Error creating project for repo xxx/xxx: {"results":[],"status":"error","errors":[{"code":500,"reason":"Failed to setup repo: Bad status code: 401"}]}

In the logs:

error: InternalOAuthError: Failed to fetch user profile (status: 401 data: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"})
strider-1 (err):     at /var/www/strider.tweakstyle.com/html/node_modules/strider-github/node_modules/passport-github/lib/strategy.js:95:19
strider-1 (err):     at passBackControl (/var/www/strider.tweakstyle.com/html/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:123:9)
strider-1 (err):     at IncomingMessage.<anonymous> (/var/www/strider.tweakstyle.com/html/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:142:7)
strider-1 (err):     at IncomingMessage.EventEmitter.emit (events.js:117:20)
strider-1 (err):     at _stream_readable.js:920:16
strider-1 (err):     at process._tickDomainCallback (node.js:459:13)
felicienfrancois commented 8 years ago

My github plugin was not up-to-date. I no longer get this error after update to latest

knownasilya commented 8 years ago

Glad to hear that :+1: