Closed knownasilya closed 9 years ago
Yes, it needs to be configured with the correct oauth app id and oauth app secret. See: https://github.com/Strider-CD/strider-github/blob/master/lib/webapp.js#L59
You'll also need to set the server name of course!
On Thu, Oct 9, 2014 at 10:30 AM, Ilya Radchenko notifications@github.com wrote:
So I'm trying to get my github setup working, but I think I had my base url misconfigured before. So now I revoked the permissions and set the right base url, but it still looks for the localhost base for the github callback url.
Are there any ENV variables for this plugin, would love a list so we can add to the readme.
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22.
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@niallo what are the env vars for those? Is there some kind of standard?
@knownasilya just updated the readme https://github.com/Strider-CD/strider-github/blob/master/Readme.md
@jaredly thanks! What's 'uncluding' in the last sentence? Typo or on purpose?
good catch :) I make up words all the time
Hum, another error:
Cannot GET /auth/github/callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fv3%2Foauth%2F%23redirect-uri-mismatch
When I click 'Add Github'
Ok I had plugin_github_hostname
, changed to strider_github_hostname
, and now get: http://localhost:3000/auth/github/callback?code=b0520655490c9ad1141d
which is wrong..
You need to set both host name parameters. I always thought the github plugin should just use the main one but such is life :-/
On Thu, Oct 9, 2014 at 10:45 AM, Ilya Radchenko notifications@github.com wrote:
Ok I had plugin_github_hostname, changed to strider_github_hostname, and now get: http://localhost:3000/auth/github/callback?code=b0520655490c9ad1141d which is wrong..
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22#issuecomment-58548458 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@niallo so strider_github_hostname AND plugin_github_hostname?
So with both set, it goes here:
no that's strider_hostname
.
@niallo I'm not opposed to that, and I can't think of a reason not to change it
Maybe cause I'm doing all caps? Were they changed to lowercase?
Maybe the plugin never receives a config? https://github.com/Strider-CD/strider-github/blob/master/lib/webapp.js#L9
So @jaredly I ran STRIDER_HOSTNAME=blah STRIDER_GITHUB_HOSTNAME=blah node debug
which strider`` with a debugger on line 60, and it's never overwritten.
plugin_github_hostname iirc
On Thursday, October 9, 2014, Ilya Radchenko notifications@github.com wrote:
So @jaredly https://github.com/jaredly I ran STRIDER_HOSTNAME=blah STRIDER_GITHUB_HOSTNAME=blah node
which strider
with a debugger on that line, and it's never overwritten.— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22#issuecomment-58554210 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@niallo nope, same The+redirect_uri+MUST error..
Trying all three now.. nope, no luck same error..
STRIDER_PLUGIN_GITHUB_HOSTNAME
maybe? I agree this is getting silly...
So strider_github_hostname
and strider_hostname
let me go to github, but when I accept it tries to go back to localhost:3000
... so I think those are good, but the callback url isn't overridden.
https://github.com/Strider-CD/strider/blob/1.5.0/main.js#L48
Looks like we only pass one argument.. https://github.com/Strider-CD/strider/blob/1.5.0/bin/strider#L238
Have you created a new github OAuth app? https://github.com/settings/applications/new
@jaredly I tried, but it was the same, maybe I'll do it again. What does the callback url need to be, just the base?
I see no reason why strider can't register itself with the right settings..
OAuth registration is a pretty high level of privelege; I don't know that there's an API for that
example callback url: https://strider-beta.herokuapp.com/ext/github/oauth/callback
sorry the docs missed that
So the callback is http://mydomain.tld/auth/github/callback and it works.
So this has to be done for every github user you add? Seems excessive.
not every github user. Just the person setting up the strider instance. You are then the "owner" of the github OAuth app. People using the strider instance can oauth without trouble
Ah, ok. Well the following env's worked for me:
@jaredly probably worthwhile releasing a new minor version.
Good call.
@niallo looks like I don't have npm permissions for strider-github
. I just bumped the version on master
thanks I'll publish later when I get home. cheers!
On Thursday, October 9, 2014, Jared Forsyth notifications@github.com wrote:
Good call. @niallo https://github.com/niallo looks like I don't have npm permissions for strider-github. I just bumped the version on master
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22#issuecomment-58597050 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
@jaredly how come the bumped changes aren't on master?
published as 1.2.3
@niallo should have been 1.3 since the enterprise features are there too.
Ok, published as 1.3.0 and also changed description of package to mention GH enterprise.
On Fri, Oct 10, 2014 at 8:36 AM, Ilya Radchenko notifications@github.com wrote:
@niallo https://github.com/niallo should have been 1.3 since the enterprise features are there too.
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22#issuecomment-58672929 .
Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins
I still appear to be having some issues using strider-github on NPM install, running make i notice this issue for test
ubuntu@ip-172-31-21-124:/usr/lib/node_modules/strider/node_modules/strider-github$ sudo make ERROR: Can't open *.js
github api getFile ✓ should get a file (54ms) ✓ should get @ a ref createHooks 1) should fail on bad credentials
should create a hook
webhooks commit hook parsing ✓ should work pull request hook parsing ✓ should work verifySignature ✓ should verify valid signature ✓ should not verify invalid signature
6 passing (105ms) 1 pending 1 failing
1) github api createHooks should fail on bad credentials:
TypeError: Object #
make: *\ [test-only] Error 1
this origin issue to the above massage is this:
GET /auth/github 302 4ms - 0b
13 Oct 00:43:35 - error: 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
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.
I hacked the issue by hand coding in my email at /usr/lib/node_modules/strider/node_modules/strider-github/lib/webapp.js:167
Did you have an email setup on your github account? On Oct 12, 2014 8:49 PM, "Zeke Dean" notifications@github.com wrote:
I solved the issue by hand coding in my email at /usr/lib/node_modules/strider/node_modules/strider-github/lib/webapp.js:167
— Reply to this email directly or view it on GitHub https://github.com/Strider-CD/strider-github/issues/22#issuecomment-58831681 .
So I'm trying to get my github setup working, but I think I had my base url misconfigured before. So now I revoked the permissions and set the right base url, but it still looks for the localhost base for the github callback url.
Are there any ENV variables for this plugin, would love a list so we can add to the readme.