Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add Github app connection: 400 "Unable to validate connection - verify credentials" #3122

Open
p2bauer opened this issue Feb 16, 2025 · 1 comment

Comments

@p2bauer
Copy link

p2bauer commented Feb 16, 2025

Describe the bug

I can't seem to successfully add a github app connection to my org (either as a "github app" or oauth). I'm running a self-hosted instance, and followed the directions from https://infisical.com/docs/integrations/app-connections/github#self-hosted-instance. I've confirmed all environment variables are correct.

I've also verified that I'm able to successfully make the rest call to GET https://github.com/login/oauth/access_token myself in postman (using the same code from having F12 open in the browser), so I'm unsure what's the issue.

It doesn't look like the actual exception itself gets logged unfortunately, so I don't actually know what's breaking - but this is the exception handler that fires every time:

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'App Connections' under Organizational Control
  2. Click on 'Add Connection', then select 'Github'
  3. Give any name, and choose either 'Github app' or 'OAuth' (same error in the end)
  4. Authorize the app in github
  5. Get redirected back to selfhosted instance, and it takes a while spinning but eventually I get a 400 error: "Unable to validate connection - verify credentials"

Expected behavior

I would expect the github app to be added to the connections list successfully.

Screenshots

Image

Platform you are having the issue on:

Self-hosted via docker-compose (with all environment variables set correctly)

Additional context

Running v0.111.0

One thing I did notice when manually testing in postman GET https://github.com/login/oauth/access_token - the response had an empty scope in the response body, like: ...&scope=&...

I'm not very good at typescript, but I noticed scope is not nullable - could this be an issue?

I took a stab at some additional error handling following a model I saw elsewhere in the code, let me know if I should raise a PR: https://github.com/Infisical/infisical/compare/main...p2bauer:infisical:log-validate-github-cred-error?expand=1

@p2bauer p2bauer changed the title Unable to add Github app connection: "Unable to validate connection - verify credentials" Unable to add Github app connection: 400 "Unable to validate connection - verify credentials" Feb 16, 2025
@p2bauer
Copy link
Author

p2bauer commented Feb 21, 2025

bump. Does anyone have github secrets sync successfully set up with a self hosted instance? I'm not able to set it up due to this exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant