{"id":46656881,"url":"https://github.com/kujov/gitlab-sync","last_synced_at":"2026-03-10T05:00:42.227Z","repository":{"id":215533242,"uuid":"738775848","full_name":"kujov/gitlab-sync","owner":"kujov","description":"Free GitHub Action to automatically mirror your repository to GitLab.","archived":false,"fork":false,"pushed_at":"2026-02-28T16:44:55.000Z","size":1082,"stargazers_count":35,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-07T15:11:52.939Z","etag":null,"topics":["devops","git-mirror","github-actions","github-to-gitlab","gitlab","mirror","mirrored-repository","repository-mirror","sync"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kujov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-04T02:40:26.000Z","updated_at":"2026-03-05T19:11:14.000Z","dependencies_parsed_at":"2024-06-10T16:14:49.390Z","dependency_job_id":"e29a3905-a6f8-43fe-8fd6-7f04c05fe97a","html_url":"https://github.com/kujov/gitlab-sync","commit_stats":null,"previous_names":["keninkujovic/gitlab-synch","keninkujovic/gitlab-sync","kujov/gitlab-sync"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/kujov/gitlab-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujov%2Fgitlab-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujov%2Fgitlab-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujov%2Fgitlab-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujov%2Fgitlab-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kujov","download_url":"https://codeload.github.com/kujov/gitlab-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujov%2Fgitlab-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30325598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","git-mirror","github-actions","github-to-gitlab","gitlab","mirror","mirrored-repository","repository-mirror","sync"],"created_at":"2026-03-08T08:01:21.978Z","updated_at":"2026-03-10T05:00:42.218Z","avatar_url":"https://github.com/kujov.png","language":null,"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/gitlab-sync.png\" width=\"35%\" alt=\"GitLab Sync\"\u003e\n  \u003ch1\u003eGitLab Sync\u003c/h1\u003e\n  \u003cp\u003eA GitHub Action for automatically mirroring your GitHub repository to GitLab.\u003c/p\u003e\n\n  [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-GitLab%20Sync-blue?logo=github)](https://github.com/marketplace/actions/sync-to-gitlab)\n  [![Latest Release](https://img.shields.io/github/v/release/kujov/gitlab-sync)](https://github.com/kujov/gitlab-sync/releases)\n  [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n\u003c/div\u003e\n\n---\n\n## Overview\n\nGitLab Sync pushes your repository to GitLab on every push. It handles the full checkout, validation, and push — including full git history and optional Git LFS objects.\n\n**Features:**\n- Full history sync (`fetch-depth: 0`)\n- Optional Git LFS support\n- Optional force push\n- Clear error messages for misconfigured secrets\n\n---\n\n## Quick Start\n\n### 1. Add Secrets\n\nIn your GitHub repository go to `Settings \u003e Secrets and variables \u003e Actions` and add:\n\n| Secret | Description |\n|--------|-------------|\n| `GITLAB_URL` | Full HTTPS URL of your GitLab repo — e.g. `https://gitlab.com/user/repo.git` |\n| `USERNAME` | Your GitLab username |\n| `GITLAB_PAT` | A GitLab Personal Access Token with `write_repository` scope |\n\n\u003e **Tip:** Generate a GitLab PAT at `User Settings \u003e Access Tokens`. Minimum required scope is `write_repository`.\n\n### 2. Add a Workflow\n\nCreate `.github/workflows/sync-to-gitlab.yml` in your repository:\n\n```yaml\nname: Sync to GitLab\n\non:\n  push:\n    branches: [main]\n\njobs:\n  sync:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Sync to GitLab\n        uses: kujov/gitlab-sync@main\n        with:\n          gitlab_url: ${{ secrets.GITLAB_URL }}\n          username: ${{ secrets.USERNAME }}\n          gitlab_pat: ${{ secrets.GITLAB_PAT }}\n```\n\nThat's it, every push to `main` will mirror to your GitLab repository.\n\n---\n\n## Configuration\n\n### Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `gitlab_url` | HTTPS URL of the target GitLab repository | Yes | — |\n| `username` | Your GitLab username | Yes | — |\n| `gitlab_pat` | GitLab PAT with `write_repository` scope | Yes | — |\n| `force_push` | Force push to GitLab, overwriting remote history | No | `false` |\n| `git_lfs` | Also push Git LFS objects to GitLab | No | `false` |\n\n### Sync all branches\n\nChange the trigger to sync on pushes to any branch:\n\n```yaml\non:\n  push\n```\n\n### Force push\n\nUse with caution — this overwrites the GitLab repository history:\n\n```yaml\n      - uses: kujov/gitlab-sync@main\n        with:\n          gitlab_url: ${{ secrets.GITLAB_URL }}\n          username: ${{ secrets.USERNAME }}\n          gitlab_pat: ${{ secrets.GITLAB_PAT }}\n          force_push: true\n```\n\n### Git LFS\n\nTo also sync LFS objects, enable `git_lfs`. Make sure LFS is enabled on your GitLab repository before using this.\n\n```yaml\n      - uses: kujov/gitlab-sync@main\n        with:\n          gitlab_url: ${{ secrets.GITLAB_URL }}\n          username: ${{ secrets.USERNAME }}\n          gitlab_pat: ${{ secrets.GITLAB_PAT }}\n          git_lfs: true\n```\n\n---\n\n## Troubleshooting\n\n**Authentication failed**\nVerify `GITLAB_PAT` is valid and has `write_repository` scope. Tokens expire — check `User Settings \u003e Access Tokens` on GitLab.\n\n**Push rejected (non-fast-forward)**\nThe GitLab repository has commits not in GitHub. Use `force_push: true` to overwrite, or manually reconcile histories.\n\n**LFS objects not syncing**\nEnsure Git LFS is enabled on the GitLab repository (`Settings \u003e General \u003e Visibility \u003e Git LFS`) and that `git_lfs: true` is set.\n\n**Invalid `gitlab_url` format**\nThe URL must be a full HTTPS URL ending in `.git`, e.g. `https://gitlab.com/user/repo.git`.\n\n---\n\n## Contributing\n\nIssues and pull requests are welcome. If this action is useful to you, consider starring the repository.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkujov%2Fgitlab-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkujov%2Fgitlab-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkujov%2Fgitlab-sync/lists"}