strider icon indicating copy to clipboard operation
strider copied to clipboard

I can't add github repo

Open tgagor opened this issue 11 years ago • 8 comments

When I'm trying to add repo from github its redirecting me to http://localhost:3000/auth/github/callback?code=c2dcXXX

I've tried to replace localhost by proper hostname, and this generates error page:

Express
500 TypeError: Cannot read property '0' of undefined

    at makeAccount (/usr/lib/node_modules/strider/node_modules/strider-github/lib/webapp.js:167:28)
    at Strategy.validateAuth [as _verify] (/usr/lib/node_modules/strider/node_modules/strider-github/lib/webapp.js:152:26)
    at /usr/lib/node_modules/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:188:22
    at /usr/lib/node_modules/strider/node_modules/strider-github/node_modules/passport-github/lib/strategy.js:109:5
    at passBackControl (/usr/lib/node_modules/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:126:9)
    at IncomingMessage. (/usr/lib/node_modules/strider/node_modules/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:143:7)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

Please help me get rid of that.

tgagor avatar Dec 09 '14 16:12 tgagor

@gagor you must set the SERVER_NAME environment variable to your domain. See the Configuring section.

knownasilya avatar Dec 09 '14 16:12 knownasilya

you also need to register a github app, see the docs for strider-github

jaredly avatar Dec 09 '14 17:12 jaredly

Closing, since this is documented. I also cleaned up the README to help with issues along this path.

knownasilya avatar Dec 09 '14 20:12 knownasilya

Hi guys,

sorry I didn't respond yesterday but I've done this ticket just before going out of work.

@knownasilya I have SERVER_NAME configured to http://strider.my.host.com:3000 without trailing slash. I've also tried setting PLUGIN_GITHUB_HOSTNAME to the same hostname, but that also doesn't help.

tgagor avatar Dec 10 '14 08:12 tgagor

Do you configure port-forwading in your router?

fernandoneto avatar Dec 10 '14 11:12 fernandoneto

@gagor which version of strider are you using?

knownasilya avatar Dec 10 '14 13:12 knownasilya

This was on version 1.5.0.

The reason behind a problem was badly configured domain strider.my.host.com - it was pointing to bad IP (typo). This was not my error but also not error in strider itself.

To make this request constructive: redirect to localhost is unreasonable for me. I can't imagine real life example where this should be requested behaviour. In such case strider should provide descriptive error message pointing to things that should be checked.

tgagor avatar Dec 11 '14 16:12 tgagor

@gagor thanks for the constructive feedback.

knownasilya avatar Dec 11 '14 16:12 knownasilya