Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/ai-tools/gcx/resources/link-github-account.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/ai-tools/gcx/resources/link-github-account/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Link your GitHub account to Grafana Assistant
Grafana Assistant authors pull requests and answers @grafana mentions with the permissions of the GitHub account linked to your Grafana user. Use gcx to link that account, check which one is linked, and unlink it. GitHub account commands are experimental and require Grafana Cloud.
Before you begin
Before you link your GitHub account, complete the following tasks:
- Configure a gcx context for a Grafana Cloud stack with GitHub connected to Grafana Assistant.
- Sign in to the context as yourself with
gcx login --oauth. A GitHub account links to a Grafana user, so you can’t use a context that authenticates with a service account token. - Make sure you have the
grafana-assistant-app.chats:accessorgrafana-assistant-app.github:writeaction.
Link your account
To link your GitHub account to your Grafana user, complete the following steps:
Run the following command:
shellgcx assistant github-account linkgcxopens GitHub in your browser. If the browser doesn’t open, visit the URL thatgcxprints.Make sure your browser is signed in to Grafana as the same user as your
gcxcontext.Approve access on GitHub.
gcxlinks the GitHub account that approves access, so your GitHub and Grafana usernames don’t need to match. The command waits up to 10 minutes for you to approve access. To cancel, pressCtrl+C.When
gcxconfirms the linked account, close the browser tab.
When an account is already linked, link changes nothing. To link a different account, unlink the current one first.
Check the linked account
To see which GitHub account is linked to your Grafana user, run the following command:
gcx assistant github-account statusIf someone revokes the account’s GitHub authorization, status shows the account as not linked. To restore the link, run link again.
Unlink your account
To remove the GitHub account from your Grafana user, run the following command:
gcx assistant github-account unlinkUnlinking also revokes Grafana Assistant’s GitHub authorization for the account. The command asks for confirmation. To skip it, add --force.
If you connected the account under Git hosts in Grafana Assistant settings, you can only disconnect it there.
Was this page helpful?
Related resources from Grafana Labs


