I am trying to setup Git Auth with Coder Envbuilder
I'm trying to set up GitHub authentication with Coder's Envbuilder, but I'm a bit lost when it comes to configuring Terraform.
Here's what I've done so far:
I briefly looked at the
I briefly looked at the
.tf
file and placed the coder_external_auth
block below the coder_workspace_owner
.
I then added this:
before ENVBUILDER_GIT_URL
.
Thanks in advance for your help!33 Replies
<#1290930703294402620>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hi @TWA see the following thread: https://discord.com/channels/747933592273027093/1287496944557494295/1287496944557494295
error: external auth provider "github" is not configured
Attempted to validate the user's oauth access token from the authentication flow. This situation may occur as a result of an external authentication provider misconfiguration. Verify the external authentication validation URL is accurately configured.
after authenticating i still get the error, but in the external auth tab it says authenticated, should I worry about the error, or can i just ignore it?
okay cool, now i tried cloning a private repo and i'm getting Failed to clone repository: clone "https://github.com/xyz/abc": authorization failed
this is my main.tf file:
coolhey, could you share how you configured the external auth in your Coder settings and how you configured the app on GitHub?
sure
you need to create a separate app for the external auth with a different callback URL
https://coder.com/docs/admin/external-auth
i'm currently using two apps one for external auth and one for sso
alright then all you need to do is edit that callback URL
add
/external-auth/primary-github/callback
at the end of itit's currently set to that
is this the one for your SSO?
yes
and the permissions:
this is the permissions for the external auth one, correct?
yes
could you send this as text?
i'm having trouble reading it
sure
nevermind it's good
was opening the wrong link
I tried unlinking and relinking external auth again, this is the error message, the one i sent previously was when i clicked reauthenticate:
cool, it's showing my auth provider is linked (it showed the same before)
i'm going to try creating a DevContainer with a private repo URL again to see if I missed any details
.
i'm probably doing something pretty simple wrong
tried again, same issue this time
@TWA what version of Coder are you running?
v2.16.0+683a720
Okay, it works now! Instead of using the
External Auth
section in the Coder UI, I manually added the GitHub app through the github's UI. Now it shows that my organization is authenticated, and cloning private repos work.great!
sorry that we weren't able to help you sooner, this issue was pretty tough to debug and i was pretty busy 😅
@Phorcys closed the thread.