Set up Git Sync
Caution
Git Sync is available in public preview for Grafana Cloud, and is an experimental feature in Grafana v12 for open source and Enterprise editions. Documentation and support is available based on the different tiers but might be limited to enablement, configuration, and some troubleshooting. No SLAs are provided.
Git Sync is under development. Refer to Usage and performance limitations for more information. Contact Grafana for support or to report any issues you encounter and help us improve this feature.
To set up Git Sync and synchronize your Grafana dashboards and folders with a GitHub repository, follow these steps:
- Read Before you begin carefully
- Set up Git Sync using the UI or as code
- After setup, verify your dashboards
- Optionally, you can also extend Git Sync with webhooks and image rendering
Set up Git Sync using the UI
To set up Git Sync from the Grafana UI, follow these steps:
- Log in to your Grafana server with an account that has the Grafana Admin flag set.
- Select Administration > General > Provisioning in the left-side menu to access the Git Sync configuration screen. If you already have an active Git Sync connection, go to the Get started tab.
- Select your provider to start a new Git Sync setup: GitHub, GitLab, Bitbucket, or Pure Git.
- Configure the provisioning repository.
- Choose what content to sync with Grafana.
- Synchronize with external storage.
- Choose additional settings.
Select your provider
Git Sync is available for any Git provider through a Pure Git repository type, and has specific enhanced integrations for GitHub, GitLab and Bitbucket. Refer to Compatible providers for more details.
Alternatively, on-prem file provisioning in Grafana lets you include resources, including folders and dashboard JSON files, that are stored in a local file system. Refer to Provision resources on-prem for more details.
Select any of the following options to proceed:
Configure with GitHub
If you want to configure Git Sync for GitHub, you can connect using a Personal Access Token or with GitHub App.
Connect with a GitHub Personal Access Token
If you want to configure Git Sync for GitHub and authenticate with a Personal Access Token, sign in to GitHub and create a new fine-grained personal access token with these permissions:
- Contents: Read and write permission
- Metadata: Read-only permission
- Pull requests: Read and write permission
- Webhooks: Read and write permission
Refer to Managing your personal access tokens for instructions.
Return to Grafana and fill in the following fields:
- Paste your GitHub personal access token into Enter your access token.
- Paste the Repository URL for your GitHub repository into the text box.
Select Configure repository to set up your provisioning folder.
Connect with GitHub App
Note
Refer to Create a GitHub App for instructions on how to create a GitHub App.
If you want to configure Git Sync for GitHub and authenticate with GitHub App:
If you already have an existing GitHub App connected:
- Select Choose an existing app.
- Click on the existing connection you want to use, and click on Configure repository to proceed.
- Paste the Repository URL for your GitHub repository into the text box.
If you want to connect using a new GitHub App:
- Select Connect to a new app.
- Type in the following fields:
- The ID of the GitHub App you want to use
- The GitHub Installation ID
- The Private Key
- Click on Configure repository to proceed.
- Paste the Repository URL for your GitHub repository into the text box.
Note that your GitHub App must have the following permissions:
- Contents: Read and write permission
- Metadata: Read-only permission
- Pull requests: Read and write permission
- Webhooks: Read and write permission
Select Configure repository to set up your provisioning folder.
Configure with GitLab
If you want to configure Git Sync for GitLab, you need a GitLab Personal Access Token. To create one, sign in to GitLab and create a token with these permissions:
- Repository: Read and write permission
- User: Read only permission
- API: Read and write permission
Return to Grafana and fill in the following fields:
- Paste the token into the Project Access Token text box.
- Paste the Repository URL for your GitLab repository into the text box.
Select Configure repository to set up your provisioning folder.
Configure with Bitbucket
If you want to configure Git Sync for Bitbucket, you need a Bitbucket API token with scopes. To create one, sign in to Bitbucket and create an API token with these permissions:
- Repositories: Read and write permission
- Pull requests: Read and write permission
- Webhooks: Read and write permission
Return to Grafana and fill in the following fields:
- Paste the token into the API Token text box.
- Paste the Repository URL for your GitLab repository into the text box.
Select Configure repository to set up your provisioning folder.
Configure with Pure Git
If you’re using another Git provider, you need to use the Pure Git option to configure your connection with a Personal Access Token:
- Paste the access token or password of the Git repository you want to sync in Access Token.
- Enter a Username. Git Sync will use this name to access the Git repository.
- Paste the Repository URL of your Git repository into the text box.
Select Configure repository to set up your provisioning folder.
Configure the provisioning repository
After configuring your connection authentication, continue to enter the details of the repository you want to use for provisioning:
- Enter a Branch to use for provisioning. The default value is
main. - Optionally, you can add a Path to a subdirectory where your dashboards are stored.
Select Choose what to synchronize to have the connection to your repository verified and continue setup.
Choose what to synchronize
On this screen, you will sync the external resources you specified in the previous step with your Grafana instance. These provisioned resources will be stored in a new folder in Grafana without affecting the rest of your instance.
To set up synchronization:
- Select the external storage you want to sync with your Grafana instance. The UI provides information about the available resources you can sync.
- Enter a Display name for your repository connection. All the synced resources from this Git Sync connection will appear under the this name in the Grafana UI.
- Click Synchronize with external storage to continue.
- You can repeat this process for up to 10 connections.
Note
Optionally, you can export any unmanaged resources into the provisioned folder. See how in Synchronize with external storage.
Select Choose additional settings to continue setup.
Synchronize with external storage
In this screen:
- Review the known limitations before proceeding.
- Check the Migrate existing resources box to migrate your unmanaged dashboards to the provisioned folder. If you select this option, all future updates are automatically saved to the synced Git repository and provisioned back to the instance.
- Click Begin synchronization to create the Git Sync connection.
After the process is completed, you will see a summary of the synced resources.
Click Choose additional settings for the final configuration steps.
Choose additional settings
In this last step, you can configure the Sync interval (seconds) to indicate how often you want your Grafana instance to pull updates from GitHub. The default value is 300 seconds in Grafana Cloud, and 60 seconds in Grafana OSS/Enterprise.
You can also select these optional settings:
- Check Read only to ensure resources can’t be modified in Grafana.
- Check Enable pull request option when saving to choose whether to open a pull request when saving changes. If the repository does not allow direct changes to the main branch, a pull request may still be required.
- Check Enable push to configured branch to allow direct commits to the configured branch.
Select Finish to complete the setup.
Verify your dashboards in Grafana
To verify that your dashboards are available at the location that you specified, go to Dashboards. The name of the dashboard is listed in the Name column.
Now that your dashboards have been synced from a repository, you can customize the name, change the branch, and create a pull request (PR) for it. Refer to Manage provisioned repositories with Git Sync for more information.
Update or delete your synced resources
To update or delete your repository configuration after you’ve completed setup:
- Log in to your Grafana server with an account that has the Grafana Admin flag set.
- Select Administration > General > Provisioning.
- Go to the Repositories tab, and locate the repository you want to modify.
- Select Settings to access the Configure repository screen:
- To modify your configuration, update any of the settings and select Save.
- To delete the repository, click Delete. You can either keep the synced resources or delete them.
Next steps
You’ve successfully set up Git Sync to manage your Grafana dashboards through version control. Your dashboards are now synchronized with a GitHub repository, enabling collaborative development and change tracking.
To learn more about using Git Sync refer to the following documents:



