Prerequisites
Before setting up Git sync, ensure you have:1
Git Installed
2
Git Repository
Create a repository on your preferred Git service:
- GitHub
- GitLab
- Gitee
- Self-hosted Git server
3
Authentication
Set up SSH keys or access tokens for authentication
Quick Setup
For New Workspaces
1
Create Workspace
Create a new workspace in Auk
2
Enable Git Sync
In workspace settings, enable “Git Synchronization”
3
Enter Repository URL
4
Initial Push
Auk will push your current workspace data to the repository
For Existing Workspaces
1
Open Workspace Settings
Navigate to Settings → Git Sync
2
Initialize Git
Click “Initialize Git Repository”
3
Add Remote
Enter your remote repository URL
4
Push Existing Data
Auk commits and pushes your existing collections
Repository Setup
GitHub
- Create Repository
- SSH Setup
- HTTPS with Token
- Go to github.com/new
- Enter repository name:
api-collections - Choose Private (recommended for API data)
- Do NOT initialize with README
- Click “Create repository”
GitLab
- Create Project
- SSH Setup
- Deploy Token
- Go to GitLab → New Project
- Choose “Create blank project”
- Enter project name:
api-collections - Set visibility to Private
- Uncheck “Initialize repository with a README”
- Click “Create project”
Gitee (码云)
- 创建仓库
- SSH 配置
- 访问 gitee.com
- 点击 ”+” → “新建仓库”
- 输入仓库名称:
api-collections - 选择 私有
- 不要初始化 README
- 点击 “创建”
Authentication Methods
SSH Keys (Recommended)
Most secure and convenient method:1
Generate SSH Key
2
Start SSH Agent
3
Copy Public Key
4
Add to Git Service
Add the public key to your Git service (GitHub/GitLab/etc.)
5
Test Connection
HTTPS with Personal Access Token
Alternative method using HTTPS:1
Generate Token
Create a personal access token in your Git service settings
2
Required Permissions
- GitHub:
reposcope - GitLab:
read_repository,write_repository - Gitee:
projectsscope
3
Use in Auk
Enter repository URL with token:
Initial Configuration
Configure Git User
Set your Git identity:Configure Auk Git Settings
In Auk workspace settings:Sync Strategies
Automatic Sync
Enable automatic synchronization:Automatically sync at regular intervals
Sync interval in secondsRecommended values:
300(5 min) - Active team collaboration900(15 min) - Balanced (default)3600(1 hour) - Less frequent updates
Manual Sync
Trigger sync manually when needed:- Click sync button in workspace toolbar
- Use keyboard shortcut:
Cmd/Ctrl + Shift + S - Before switching workspaces
- After completing a feature
Branch Strategy
Single Branch (Simple)
Use one branch for all work:- Small teams
- Simple workflows
- Quick collaboration
Feature Branches
Create branches for features:- Larger teams
- Complex changes
- Code review workflows
Environment Branches
Separate branches per environment:- Multiple environments
- Staged deployments
- Testing workflows
First Sync
Push Existing Data
If you have existing collections:1
Auk Creates Initial Commit
2
Push to Remote
Auk pushes the commit to your remote repository
3
Verify
Check your Git service to confirm data is uploaded
Clone Existing Repository
If joining an existing team:1
Create Workspace
Choose “Clone from Git” when creating workspace
2
Enter Repository URL
3
Clone and Open
Auk clones the repository and opens the workspace
Verification
Check Git Status
Verify Git is working correctly:Test Sync
Make a small change and verify sync:- Create a new collection or request
- Wait for auto-sync or trigger manual sync
- Check Git service for new commit
- Verify changes appear for team members
Troubleshooting
Authentication failed
Authentication failed
Symptoms: Cannot push/pull, authentication errorsSolutions:
- Verify SSH key is added to Git service
- Test SSH connection:
ssh -T [email protected] - Check token has correct permissions
- Regenerate SSH key or token if needed
Permission denied
Permission denied
Symptoms: “Permission denied (publickey)” errorSolutions:
Repository not found
Repository not found
Symptoms: “Repository not found” or 404 errorSolutions:
- Verify repository URL is correct
- Check you have access to the repository
- Ensure repository exists on Git service
- Try cloning manually to test access
Sync fails with conflicts
Sync fails with conflicts
Symptoms: Sync stops with merge conflictSolutions:
- See Conflict Resolution
- Pull latest changes first
- Resolve conflicts manually if needed
Next Steps
Auto Sync
Configure automatic synchronization
Conflict Resolution
Learn how to handle merge conflicts
Authentication
Advanced authentication options
Troubleshooting
Common issues and solutions