๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Git

[Git] Gitlab์—์„œ Github๋กœ ๋ฏธ๋Ÿฌ๋ง ์„ค์ •

by D.B_18 2021. 12. 13.

๐Ÿ’ก์˜ˆ์ „์— ํ”„๋กœ์ ํŠธ๋ฅผ ํ–ˆ๋˜ ๋‚ด์šฉ์ด gitlab์— ์žˆ๋Š”๋ฐ, ํ˜„์žฌ๋Š” github๋ฅผ ์‚ฌ์šฉ์ค‘์ด๋ผ ์ปค๋ฐ‹์„ ์˜ฎ๊ธฐ๊ธฐ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ ์˜ค๋Š˜์€ gitlab์—์„œ github๋กœ ๋ฏธ๋Ÿฌ๋ง ์„ค์ •์„ ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

 

1. Github์—์„œ ํ† ํฐ ๋ฐœ๊ธ‰

์šฐ์„  github์—์„œ ํ”„๋กœํ•„ ์•„์ด์ฝ˜์„ ๋ˆ„๋ฅด๋ฉด ๋‚˜์˜ค๋Š” ๋ฆฌ์ŠคํŠธ์—์„œ settings ํด๋ฆญ

Developer settings ํด๋ฆญ

personal access tokens ํด๋ฆญ

Gitlab ๋ฏธ๋Ÿฌ๋ง์—์„œ๋Š” repo ๊ถŒํ•œ๋งŒ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— repo๋งŒ ์ฒดํฌํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์„ค์ •์„ ํ•˜๊ณ  Generate Token์„ ํด๋ฆญํ•ด ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์„ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

2. Gitlab์„ ๋ฏธ๋Ÿฌ๋งํ•  Github repository ์ƒ์„ฑ

์›ํ•˜๋Š” Repository name์„ ์ž…๋ ฅํ•˜๊ณ  repository๋ฅผ ์ƒ์„ฑ ํ•ฉ๋‹ˆ๋‹ค.

3. Gitlab Repository ์—ฐ๊ฒฐ

๋ฏธ๋Ÿฌ๋งํ•  gitlab repository์˜ ์ขŒ์ธก ๋ฉ”๋‰ด๋ฅผ ๋ณด๋ฉด Settings ํ•˜์œ„์— Repository ๋ฉ”๋‰ด๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

ํ•ด๋‹น ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•ด์„œ ๋ณด์ด๋Š” Mirroing repositories ์˜†์— expand ๋ฒ„ํŠผ์„ ํด๋ž™ํ•ด์ค๋‹ˆ๋‹ค.

git repository URl์—๋Š” 2๋ฒˆ์—์„œ ์ƒ์„ฑํ–ˆ๋˜ Github์˜ repository https ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

์›๋ž˜ ์ฃผ์†Œ๋Š” github.com/๋‹‰๋„ค์ž„/์ €์žฅ์†Œ ์ด๋ ‡๊ฒŒ ๋˜์–ด์žˆ๋Š”๋ฐ, github.com ๋ถ€๋ถ„์„ ๋‹‰๋„ค์ž„@github.com์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

ex) Kim-Eun-Bin@github.com/Kim-Eun-Bin/Mirroring.git

Password์—๋Š” 1๋ฒˆ์—์„œ ์ƒ์„ฑํ–ˆ๋˜ github token์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

์ž…๋ ฅ์„ ๋งˆ์ณค์œผ๋ฉด Mirror Repository๋ฅผ ๋ˆŒ๋Ÿฌ ๋ฏธ๋Ÿฌ๋ง์„ ์™„๋ฃŒํ•˜๊ณ , github ํŽ˜์ด์ง€๋กœ ๋Œ์•„๊ฐ€ ์ฝ”๋“œ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ๋ณด์ด๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

 

 

Gitlab์—์„œ Github๋กœ ๋ฏธ๋Ÿฌ๋งํ•˜๊ธฐ๋Š” ์—ฌ๊ธฐ๊นŒ์ง€ ์ž…๋‹ˆ๋‹ค!

728x90
๋ฐ˜์‘ํ˜•

'Git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Git] Git branch ๊ด€๋ จ ๋ช…๋ น์–ด ์ •๋ฆฌ  (0) 2021.12.23
[Git] Git branch ๋ณ‘ํ•ฉ ์ „๋žต  (0) 2021.12.20
[Git] git ๋ช…๋ น์–ด ์ทจ์†Œ  (0) 2021.12.13