<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42" -->

---
title: Mirroring a Gitlab project to Github | daily.dev
description: Step-by-step guide to mirror a GitLab repository to GitHub using SSH deploy keys and a post-receive hook. Covers granting write access via a deploy key,...
canonical: https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Mirroring a Gitlab project to Github | daily.dev
og:description: Step-by-step guide to mirror a GitLab repository to GitHub using SSH deploy keys and a post-receive hook. Covers granting write access via a deploy key,...
og:url: https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42
og:image: https://api.daily.dev/og/posts/dEIbmfM42.png
og:image:alt: Mirroring a Gitlab project to Github
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Mirroring a Gitlab project to Github

**[Sam McLeod](https://daily.dev/sources/smcleod)** · 1 min read · 0 upvotes · 0 comments

## Summary

Step-by-step guide to mirror a GitLab repository to GitHub using SSH deploy keys and a post-receive hook. Covers granting write access via a deploy key, creating a custom post-receive hook that auto-pushes to GitHub on every commit, and configuring GitHub as a remote with mirror mode in the GitLab repo's git config.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://smcleod.net/2016/02/mirroring-a-gitlab-project-to-github/>

## Similar posts on daily.dev

- [You already have a git server: \(Maurycy's blog\)](https://daily.dev/posts/you-already-have-a-git-server-maurycy-s-blog--z2gsbe3ok) · Hacker News · 3 upvotes · 0 comments
- [How to make a bidirectional GitHub Repository Sync](https://daily.dev/posts/how-to-make-a-bidirectional-github-repository-sync-6flslldzx) · Faun · 2 upvotes · 0 comments
- [GitHub for Beginners: Answers to some common questions](https://daily.dev/posts/github-for-beginners-answers-to-some-common-questions-x6tcwdbom) · GitHub Blog · 0 upvotes · 0 comments
- [Backing Up GitHub Repositories the Easy Way with Gitea Mirror](https://daily.dev/posts/backing-up-github-repositories-the-easy-way-with-gitea-mirror-ff9lvg0xr) · Noted · 9 upvotes · 2 comments
- [MUST READ: Git – Going Pro « ipSpace.net blog](https://daily.dev/posts/must-read-git-going-pro-ipspace-net-blog-n1tdxo4af) · ipSpace.net Blog · 0 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#git](https://daily.dev/tags/git), [#gitlab](https://daily.dev/tags/gitlab)

[View this post on daily.dev](https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Mirroring a Gitlab project to Github","url":"https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42"},"datePublished":"2026-03-31T12:29:04.161Z","dateModified":"2026-03-31T12:47:45.822Z","description":"Step-by-step guide to mirror a GitLab repository to GitHub using SSH deploy keys and a post-receive hook. Covers granting write access via a deploy key,...","image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","thumbnailUrl":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","isAccessibleForFree":true,"articleSection":"Sam McLeod","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sam McLeod","logo":"https://media.daily.dev/image/upload/s---ERPerFg--/f_auto,q_auto/v1774960030/logos/smcleod?_a=BAMAMiWQ0","url":"https://daily.dev/sources/smcleod"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/mirroring-a-gitlab-project-to-github-deibmfm42","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"github,git,gitlab","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sam McLeod","item":"https://daily.dev/sources/smcleod"},{"@type":"ListItem","position":3,"name":"Mirroring a Gitlab project to Github"}]}
```

