You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决Crafter CMS创作环境发布内容未同步至远程Git仓库问题?

Troubleshooting Missing Sync to Remote Git Repo in Crafter CMS

It sounds like your initial site setup connected properly to the remote repo, but subsequent changes (content types, pages, live branch) aren’t pushing through. Let’s walk through the most common fixes to get your sync working again:

1. Verify Remote Git Configuration in Studio

First, double-check that your site is set up to automatically push changes to the remote repo:

  • Navigate to your Site Dashboard → Configuration → Git Configuration
  • Ensure the Remote URL matches your bare repo’s address (SSH/HTTPS)
  • Confirm that Auto Push Changes is enabled for both the authoring branch (usually master/main) and the live branch
  • Check that the Push on Publish option is toggled on—this ensures the live branch gets pushed to the remote when you publish content

2. Validate Git Push Permissions

Since the initial commit worked, permissions might have changed or the local Crafter process lacks write access now:

  • Log into the server where Crafter is running
  • Navigate to your site’s repo directory: cd crafter/data/repos/sites/<your-site-name>
  • Test pushing manually to surface any errors:
    • For authoring changes: git push origin master (or main, depending on your branch name)
    • For live branch: git push origin live
  • If you get authentication errors, verify SSH keys (for SSH remotes) or credentials (for HTTPS) are correctly set up for the user running Crafter Studio

3. Check Publish Job Status

Failed publish jobs can prevent the live branch from being pushed to the remote:

  • Go to Site Dashboard → Publishing → Jobs
  • Look for any failed jobs (marked with a red icon)
  • Click into the failed job to view details, or check the studio logs at crafter/logs/studio/studio.log for specific error messages (e.g., merge conflicts, network issues)

4. Ensure Live Branch is Tracking Remote

Sometimes the local live branch isn’t configured to track the remote live branch:

  • From your site’s repo directory, run git branch -vv to check branch tracking status
  • If the live branch doesn’t show [origin/live], set it up with:
    git branch -u origin/live live
    
  • Then try pushing the live branch again with git push origin live

5. Resolve Git Merge Conflicts

If changes were made directly in the remote repo (outside Crafter), this can block pushes:

  • Pull the latest changes from the remote for both branches:
    git pull origin master
    git pull origin live
    
  • Resolve any merge conflicts that appear, commit the fixes, then try pushing again

6. Inspect Crafter Studio Logs

If none of the above works, dig into the logs for targeted clues:

  • Open crafter/logs/studio/studio.log
  • Search for keywords like git push, remote, or publish to find error messages related to sync failures
  • Common issues here include network timeouts, invalid repo URLs, or permission denied errors

Once you’ve addressed the root cause, try publishing a test page or content type again to confirm the sync works as expected.

内容的提问来源于stack exchange,提问作者Maros Ivanco

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:44:05