Skip to content

.gitconfig not included in R2 backup/restore #230

@cindyrui71

Description

@cindyrui71

Problem

src/gateway/sync.ts syncs config, workspace, and skills to R2, but not /root/.gitconfig. Similarly, start-openclaw.sh restores config, workspace, and skills from R2 but not git config.

If you configure git identity (git config --global user.name/email) inside the container, it's lost on restart.

Suggested fix

Sync — add to the sync script after the skills rsync:

test -f /root/.gitconfig && cp /root/.gitconfig ${R2_MOUNT_PATH}/gitconfig 2>/dev/null || true

Restore — add to start-openclaw.sh after the skills restore:

if [ "$DO_RESTORE" = true ] && [ -f "$BACKUP_DIR/gitconfig" ]; then
    cp -f "$BACKUP_DIR/gitconfig" /root/.gitconfig
fi

Testing

Deployed and verified — git config persists across container restarts via R2.

Co-authored with Claude Code (Opus 4.6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions