This document describes how to configure Git repository connections and personal Git accounts in a workspace. After the Git connection is configured, you can create a Git folder (GitFolder) in Studio to host code files in a remote Git repository for version management.
Overview
A Git connection consists of two parts: workspace-level Git connections and user-level Git accounts.
Git connection (workspace-level): configured by the workspace administrator to define the Git repository URLs allowed in this workspace. A workspace supports configuring multiple Git connections, corresponding to multiple different Git repositories.
Git account (user-level): each user configures their own Git credentials (Token) to pull and commit code when creating a GitFolder. One Git connection corresponds to one Git account.
Note:
Relationship among workspace-level Git connections, user-level Git accounts + GitFolders in Studio:
A workspace can be bound to multiple remote Git repository URLs.
Each user configures their own authentication credentials for each Git repository.
When creating a Git folder in Studio, select a repository URL to establish a connection between the local Git repository and the remote Git repository.
Prerequisites
To configure a Git connection: you must be a workspace administrator or a custom role with Git connection management permissions.
To configure a Git account: every workspace member can configure a Git account for themselves.
The remote Git repository has been created and access is open to the current user, and the user has generated a valid Personal Access Token (PAT).
Configuring a Workspace-Level Git Connection
Adding a Git Connection
1. Go to the target workspace, and choose Workspace Settings > Git Connections in the left sidebar.
2. Click Add Connection.
3. In the pop-up window, enter the following:
|
Git repository address | HTTPS address of the remote Git repository, for example, https://github.com/your-org/your-repo.git | Yes | - |
Git service provider | Select the corresponding Git service provider: GitHub, GitLab, Azure DevOps, and so on. | Yes | - |
Git branch | Default branch name of the repository (used when a Git folder is created in Studio), such as main, master, dev | Yes | - |
Git repository network environment | Select the network access method for the Git repository: public network access or VPC. Public network access applies to repositories that can be directly connected through the public network. VPC applies to self-hosted Git services deployed in a private network (such as a private GitLab). | Yes | Public Network Access |
1. If you select Public Network Access, complete the following two network configuration steps:
2. Initialize Network Configuration: Click Initialize Network Configuration, and DataBuddy will automatically configure the network channel required for accessing public Git repositories for the current workspace.
3. Network Connectivity Test: After initialization is complete, click Network Connectivity Test to verify whether DataBuddy can access the target Git repository URL. You can save only after the test passes.
Note:
In VPC mode, you need to connect the network where the target Git repository resides to the DataBuddy network environment through an endpoint service. Otherwise, the connectivity test will fail.
4. Click Add to save.
Removing a Git Connection
In the Git Connections list, click Remove in the operation column.
Note:
Before removing a Git connection, make sure that it is not referenced by any Git folder. Otherwise, push/pull operations in the related folders will fail.
Configuring a User-Level Git Account
Each user must configure their own authentication credentials separately for each Git connection in the workspace. This configuration takes effect only for the current user.
Adding a Git Account
1. In the target workspace, go to Workspace Settings > Git Accounts.
2. You will see a list of Git connections that have been configured in the workspace. Each connection requires a corresponding Git account to be configured.
3. Click the Edit button in the operation column of a Git connection.
4. Enter the authentication information:
|
Authorization type | Currently supports Personal Access Token (PAT). | Yes |
Email | Email address used for Git commits in your Git provider | Yes |
Token | Access token generated on the Git platform, which must have read and write permissions to the repository. | Yes |
5. After the network connectivity test passes, click Save.
Modifying a Git Account
Click the Edit icon for the corresponding Git connection to update the Email or Token.
Note:
If a PAT expires or is revoked on the Git platform, the corresponding push/pull operations will fail. Refresh the Token regularly and update it here.
Using Git Connections in Studio
After completing the Git Connection + Git Account configuration, you can create a Git folder in Studio:
1. In the GitFolder area of the file tree on the left side of Studio, choose Create > Git Folder.
2. Enter the folder name and select a configured Git repository address.
3. (Optional) Enable Sparse Checkout Mode to clone only the specified file paths in the repository, avoiding pulling too many files at once.
4. The system clones the remote repository into the Git folder, and you can then start Git operations such as commit, push, and pull.
Use Limits
HTTPS Protocol: Currently, only Git repository addresses in HTTPS format are supported.
Authentication Method: Currently, only Personal Access Token is supported. SSH Key authentication and OAuth account linking are not supported yet.
Sparse Checkout Recommendation: When the remote repository contains a large number of files, it is recommended to enable sparse checkout. However, the clone operation of each Git folder is still subject to the overall Studio quota (up to 20,000 files).
Each Git Folder Binds to a Single Repository: A Git folder binds to one Git connection (that is, one remote repository URL). To use multiple repositories in the same workspace, create multiple Git folders.
FAQs
Q1: After the Git account is saved, why does it still show that you do not have permission to pull code?
Check whether the Token has read and write permissions such as repo / write_repository, and confirm that the Token has not expired or been revoked on the Git platform.
Q2: Can multiple users share the same Git account?
Not recommended. Git accounts in DataBuddy are user-level configurations, and each user operates with their own Token, making it easier to trace code authors in the remote Git repository.
Q3: Will the code in the original Git folder be lost after deleting the Git connection?
The code in the local Git folder will not be deleted, but the connection to the remote repository will be disconnected, making push/pull operations unavailable. To continue using it, create a new Git connection and Git account.
References