C
Coder.com2mo ago
saun

Github integration for the whole org

I want to create a OAuth for my whole github organisation, so If a user signs in with there github account on coder, then they can clone private github repo (accessible to them) to the workspace directly. For me to achieve this, setting up the github app is enough?
16 Replies
Codercord
Codercord2mo ago
<#1347210246611013815>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
saun
saunOP2mo ago
Using this, https://coder.com/docs/admin/users/github-auth? or is there any easier to clone private github repos from template directtly into the workspace?
Phorcys
Phorcys2mo ago
yes you, as an org admin, have to allow the github app and then the individual users should be able to clone repos using the token obtained via external auth
saun
saunOP2mo ago
environment: CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS: true CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE: false CODER_OAUTH2_GITHUB_DEVICE_FLOW: true CODER_OAUTH2_GITHUB_ALLOWED_ORGS: "example" CODER_EXTERNAL_AUTH_0_ID: github CODER_EXTERNAL_AUTH_0_TYPE: github CODER_EXTERNAL_AUTH_0_CLIENT_ID: "${CODER_GITHUB_CLIENT_ID}" CODER_EXTERNAL_AUTH_0_CLIENT_SECRET: "${CODER_GITHUB_CLIENT_SECRET}" i added this in my docker compose file but cant see the login option.
No description
Phorcys
Phorcys2mo ago
yes, external auth does not let you log in via the UI external auth is only used to pass the token to workspaces if you want users to be able to log in via GitHub, you need to also set up OAuth
saun
saunOP2mo ago
then how can a user pass this token to the workspace, little lost oh ok nvm, so external auth basically helps with accessing the github if you used it to sign up.
Phorcys
Phorcys2mo ago
OAuth:
No description
Phorcys
Phorcys2mo ago
External Auth:
No description
saun
saunOP2mo ago
but what if someone havent signed in with github, just email oh so they can use this got it
Phorcys
Phorcys2mo ago
External Auth will log me in to GitHub, the gcloud CLI and the slackme module in this case
saun
saunOP2mo ago
thanks so much Phorcys resolved! I was confused between what Oauth did and external auth did. didnt knew this setting existed. if this image is on the docs that will make it easier for other people
Phorcys
Phorcys2mo ago
noted! marking this as "improvement-needed" so we can come back to it
Codercord
Codercord2mo ago
@Phorcys closed the thread.
saun
saunOP2mo ago
can I edit the docs there? and pull request, if this will be helpful let me know.
Phorcys
Phorcys2mo ago
definitely
Phorcys
Phorcys2mo ago
GitHub
coder/docs at main · coder/coder
Provision remote development environments via Terraform - coder/coder

Did you find this page helpful?