What the connection actually wires together
Connecting GitHub gives Code three things: the list of repositories you can choose from, a clone in the runtime a session attaches, and the ability to push a Cortex-owned branch and open a pull request from it. Pushes stay on Cortex-owned branches, so the agent cannot push over your default branch.It is not a connected app reaching into your session. A Code session is built with no tool servers, no connectors and no plugins of its own, and access you have granted in Chat or in Bot does not carry into Code: a session’s own tools list can say as much. GitHub is not an exception dressed up as a connector; it is the repository source and the destination for a pull request. See Code integrations.
The control, state by state
The same control, with the same label, appears in every place Cortex might reasonably ask you for it: the Code Integrations page, Settings → Integrations, the repository picker in the composer, and the getting-started row Connect your GitHub account. Whichever one you press, it is the same connection.
A guest who presses it goes to sign-in, not to GitHub. Holding a connection requires an account, so the invitation comes first.
Connect
1
Sign in with your Cortex account
Then open Code. A guest can browse and type, but cannot hold a connection.
2
Press Connect GitHub
From the Code Integrations page, from Settings → Integrations, or straight from the repository picker in the composer, which offers the control instead of an empty list when there is nothing to list.
3
Authorise Cortex on GitHub
GitHub shows you its own consent screen and you decide there which repositories Cortex may see. Nothing in Cortex asks you for a credential, before or after.
4
Land back in Cortex
You return to a page that reads Connecting GitHub and Finishing the connection…, with Cortex is finishing the connection with GitHub. This takes a moment. It then reads GitHub is connected. Taking you back… (or
GitHub is connected as {label}. Taking you back…, with the account it connected) and returns you where you started.5
Pick a repository
Back in the composer, the first chip is Choose a repository and the second is Branch. See Repositories and branches.
If the connection does not finish
Every one of these messages ends the same way: Nothing was changed. Connecting is all or nothing, so a failure leaves you exactly where you were and you can simply try again.
You may also see the flat label GitHub could not be connected. The callback page carries Back to Code, and on a failure it offers a fresh Connect GitHub that returns you to the Code integrations page.
Cortex does not publish how long a connection lasts. You find out the ordinary way: the control reads Reconnect GitHub, which you press, approving on GitHub once more.
Disconnecting
Revoke the connection from GitHub’s own settings. Cortex has no disconnect button of its own that we can point you at, and revoking on GitHub always works: afterwards Cortex reports the connection as needing reconnection, or as not connected, and the repository list goes quiet until you connect again.Three different GitHub installs
This is the most common confusion in the area, so it is worth stating plainly. Three separate things install against GitHub, and having one does not give you another.Related
- Repositories and branches for choosing what a session works on.
- Code integrations for connected apps, repositories and tool servers.
- Code quickstart for a first session end to end.
- Pull-request review for the separate Security install.
- Code troubleshooting when a repository you expect is not listed.