Enabling GitHub integration¶
To enable integration with GitHub:
Enable the following options in the
cfg/ans-development/alan-common-config.yml
file:github.enabled
: set to true to enable all GitHub integration features:Logon with GitHub accounts
Alan AI projects synchronization with GitHub repositories
studioLogin.github.enabled
: set to true to allow users to log in to Alan AI Studio using GitHub SSO oAuth.github.codeSync.enabled
: set to true to allow users to sync their projects with GitHub (push/pull from GitHub repositories or CI/CD).oauth.github.clientId
: specify the Client ID for your GitHub OAuth App.Oauth.github.secret
: specify the client secret for your GitHub OAuth App.
In GitHub, configure a GitHub OAuth App:
Log in to GitHub and open your organization.
Go to your account > Settings.
In the left pane, select Developer settings.
In the left pane, select OAuth Apps.
In the main work area, click Register a new application.
In the displayed form, enter the application settings:
Application name: this name will be shown to users when they are asked to grant or request access to a certain GitHub repository/organization.
Homepage URL: the URL should be
https://{domain}
, replace{domain}
with the value you are using in thescripts/_ans_vars.sh
file, theALAN_DOMAIN
variable.Authorization callback URL: the URL should be
https://{domain}/githubOauth
, replace{domain}
with the value youare using in the scripts/_ans_vars.sh
file, theALAN_DOMAIN
variable.
Click Register application below.
In the Client ID section, copy the client ID and save it for later.
In the Client secrets section, click Generate a new client secret, copy and save the generated key for later.
In the
cfg/ans-development/alan-common-config.yml
file, set theoauth.github.clientId
andoauth.github.secret
to the values obtained in steps h and i.
If settings are updated after initial setup:
Run the
./scripts/local-helm-install.sh
command to redeploy the cluster.Wait for old pods to terminate and all new pods to be in status
Running 1/1
. To check the pods status, runkubectl get pods
.Open a new tab for Alan AI Studio or refresh the current tab for the changes you’ve made to take effect on the client side.