오늘도 gitlab에 있는 프로젝트를 github에 옮기는 것에 대하여 작성해보겠다.
얼마전에 gitlab의 repository를 commit 기록들과 함께 github에 전부 옮기는 것은 했었는데, 이번에는 미러링을 진행해볼 것이다.
Gitlab to Github
회사의 Gitlab에 올리려고 작성했던 Docker 관련 repository를 내 개인 Github에도 올리고 싶었다.(프로젝트 관련된 것이 아니라, 단순 Docker 환경 설정 관련된 repo임.) 단순하게 clone해서 새로운 repo에 올
changsroad.tistory.com
mirroring이 아니라, 단순 예전 기록을 옮기기 위함이라면 아래링크를 참조하면 된다.
미러링을 진행하면 gitlab을 commit하면 동시에 github도 동기화 되기 때문에 더욱 편리해졌다.(잔디도 관리할겸)
1. Github token 발급
GitHub: Let’s build from here
GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...
github.com
우선 좌측의 배너에서 `Tokens(classic)`을 눌러주고, 이후 `Generate new token`을 눌러준다.(여기서도 classic 선택)

다음으로 `Expiration`기간을 설정해주고 scope는 `repo`만 선택해주고 token을 생성해준다.
이후 이 생성된 token을 복사한다.

2. Gitlab repository setting
이제 gitlab에 들어가서 자신이 미러링 하고자하는 repository를 들어간다.
좌측 배너에서 `repository`를 선택한다음, 오른쪽 화면에서 `Mirroring repositories`의 `expand`를 눌러준다.


우선 `Git repository URL`칸에는 자신이 동기화할 github의 repository url을 적어주면 된다.
이 때 `https://github.com/{UserName}/{RepoName}.git` 이 url이라면, github 전에 username@를 추가해줘야한다.
ex) `https://{UserName}@github.com/{UserName}/{RepoName}.git`
마지막으로, 아래의 `password`칸에 위에서 발급받았던 자신의 github repository의 token을 입력해주면 github에 자신의 gitlab에 있던 repository가 정상적으로 동기화되는 것을 확인할 수 있다~
GitLab → GitHub 미러링
개인 GitLab을 사용하고 있고, private github repo에 올려서, Contribution을 동기화 시키고 싶은 니즈가 있어서 해당 방법을 알아 보게 되었다. 개발자에게 GitHub은 점점 중요성이 높아져서, 포트 폴리오의
blog.yijunho.com
'알쓸신잡' 카테고리의 다른 글
| ERROR: ON CONFLICT DO UPDATE command cannot affect row a second timeHint: Ensure... (0) | 2024.09.11 |
|---|---|
| Crontab+anaconda (0) | 2024.08.13 |
| CUDA call failed lazily at initialization with error: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED at (0) | 2024.08.05 |
| Windows Docker desktop 설치 (0) | 2024.08.04 |
| [Ollama] Ollama & Open webui Install (0) | 2024.07.31 |