Ôõô½«gitee¿Íջת³É¿ªÔ´
½üÄêÀ´£¬Ëæ×Å¿ªÔ´Èí¼þµÄÆÕ¼°ºÍ¿ªÔ´ÉçÇøµÄÉú³¤£¬Ô½À´Ô½¶àµÄ¿ª·¢Õß×îÏȽ«×Ô¼ºµÄÏîÄ¿¿ªÔ´¡£Óë´Ëͬʱ£¬ÎªÁ˸üºÃµØÖÎÀíÏîÄ¿´úÂë²¢À©´óÏîÄ¿µÄÓ°ÏìÁ¦£¬Öڶ࿪·¢ÕßÒ²×îÏÈʹÓôúÂëÍйÜƽ̨£¬ÆäÖÐÒÔgithubΪ´ú±íµÄƽ̨ÒѾÉîÈëÈËÐÄ¡£
È»¶ø£¬ÔÚijЩ³¡¾°Ï£¬ÎÒÃÇ¿ÉÄÜÐèÒª½«´úÂëÍйܵ½º£ÄڵĴúÂëÍйÜƽ̨ÉÏ£¬ÀýÈçgitee¡£µ±ÎÒÃǾöÒ齫´úÂëÍйܵ½giteeÉÏʱ£¬Ê×ÏÈÐèҪ˼Á¿µÄ¾ÍÊÇÔõÑù½«´úÂë¿ÍÕ»´ÓGitHubǨáãµ½gitee¡£
Ò»Ñùƽ³£À´Ëµ£¬´úÂëǨáãÓÐÁ½ÖÖ·½·¨£ºÒ»ÖÖÊÇÖ±½Ó½«GitHubµÄ´úÂëµ¼³ö£¬È»ºóÔÚgiteeÉÏн¨¿ÍÕ»²¢µ¼Èë´úÂ룻ÁíÒ»ÖÖÔòÊÇʹÓÿªÔ´¹¤¾ß½«GitHubµÄ¿ÍÕ»Ö±½ÓתÒƵ½giteeÉÏ¡£ÏÂÃæ»®·ÖÏÈÈÝÕâÁ½ÖÖ·½·¨µÄÏêϸ²Ù×÷°ì·¨¡£
·½·¨Ò»£º´ÓGitHubµ¼³ö´úÂ룬ÉÏ´«ÖÁgitee
µÚÒ»²½£¬·¿ªGitHub¿ÍÕ»Ò³Ã棬µã»÷¿ÍÕ»ÉÏ·½µÄ¡°Clone or download¡±°´Å¥£¬Ñ¡Ôñ¡°Download ZIP¡±Ñ¡Ï´úÂëÏÂÔص½ÍâµØ¡£
µÚ¶þ²½£¬·¿ªgitee¹ÙÍø£¬ÔÚСÎÒ˽ÈËÖÐÐÄÒ³ÃæÑ¡Ôñ¡°Ð½¨¿ÍÕ»¡±£¬Ìîд¿ÍÕ»Ãû³Æ¡¢ËµÃ÷¡¢´úÂëÐÒéµÈÐÅÏ¢£¬È»ºóµã»÷¡°Ìá½»¡±¡£
µÚÈý²½£¬ÔÚн¨¿ÍÕ»Ò³ÃæÖУ¬µã»÷¡°ÉÏ´«´úÂ롱°´Å¥£¬Ñ¡ÔñÊʲÅÏÂÔصĴúÂëZIPÎļþ²¢µã»÷¡°ÉÏ´«¡±£¬ÆÚ´ýÉÏ´«Íê³É¡£
·½·¨¶þ£ºÊ¹ÓÿªÔ´¹¤¾ßÍê³ÉGitHub¿ÍջתÒÆ
ÁíÒ»ÖÖתÒÆGitHub¿ÍÕ»µÄ·½·¨ÔòÊÇʹÓà gitlab-mirrors ¹¤¾ß¡£Õâ¸ö¹¤¾ßÊÇרΪ½«GitHub¿ÍջǨáãµ½ÆäËû´úÂëÍйÜƽ̨¶ø¿ª·¢µÄ£¬¿ÉÒÔÀû±ãµØ½«GitHubÉϵĴúÂëתÒƵ½gitee¡£
Ïêϸ²Ù×÷°ì·¨ÈçÏ£º
µÚÒ»²½£¬ÔÚGitHubÉϵã»÷¿ÍÕ»Ò³ÃæÓÒÉϽǵġ°Settings¡±°´Å¥£¬·¿ª¡°Options¡±Ò³Ã棬»¬¶¯µ½Ï·½ÕÒµ½¡°Danger Zone¡±ÇøÓò£¬µã»÷¡°Export repository¡±°´Å¥£¬½«´úÂë´ò°üÏÂÔص½ÍâµØ¡£
µÚ¶þ²½£¬·¿ª gitlab-mirrors GitHubÊ×Ò³£¬½«ÏîÄ¿ÏÂÔص½ÍâµØ£¬È»ºóÖ´ÐÐ ¡°bundle install¡± ÏÂÁî×°ÖñØÐèµÄ¿âÎļþ¡£
µÚÈý²½£¬ËùÐèµÄÉèÖÃÎļþ .env ÎļþÐèÒªÔÚÏîÄ¿¸ùĿ¼ÖÐн¨Ò»¸ö£¬È»ºóÉèÖà gitee ÁîÅÆ£º
GITLAB_API_ENDPOINT=https://gitee.com/api/v5/
GITLAB_API_PRIVATE_TOKEN=YOUR_GITEE_TOKEN
£¨×¢ÖØ£ºÕâÀïµÄ YOUR_GITEE_TOKEN ÐèÒªÌ滻ΪÄã×Ô¼ºµÄgiteeСÎÒ˽ÈËAPI˽ÓÐÁîÅÆ£©
µÚËIJ½£¬ÔÚÖÕ¶ËÖÐÖ´ÐÐÒÔÏÂÏÂÁ
bundle exec ruby gitee.rb USERNAME SOURCE_REPO_URL TARGET_NAMESPACE TARGET_REPO_NAME
ÆäÖУº
USERNAME£ºgiteeÕ˺ÅÃû
SOURCE_REPO_URL£ºGitHub¿ÍÕ»µÄHTTPS URL
TARGET_NAMESPACE£ºgiteeÕ˺ÅÃû
TARGET_REPO_NAME£ºgitee¿ÍÕ»Ãû
ÆÚ´ýÖ´ÐÐÍê³Éºó£¬¾Í¿ÉÒÔÔÚ gitee ÖÐÕÒµ½×ªÒƺóµÄ¿ÍÕ»ÁË¡£
×ܽá
ÔÚ±¾ÎÄÖУ¬ÎÒÃÇÏÈÈÝÁËÁ½ÖÖ½«GitHub¿ÍջתÒƵ½giteeµÄÒªÁ죬¼´´ÓGitHubµ¼³ö´úÂë²¢ÉÏ´«ÖÁgitee£¬ÒÔ¼°Ê¹Óà gitlab-mirrors ¹¤¾ßÍê³ÉǨáã¡£ÎÞÂÛÎÒÃÇÑ¡ÔñÄÄÖÖ·½·¨£¬¶¼ÐèҪעÖر£´æºÃ´úÂëµÄËùÓÐȨÓëÔÊÐíÖ¤£¬²¢×ñÊØ¿ªÔ´Èí¼þµÄÏà¹Ø»®¶¨¡£Í¨¹ý½«¿ªÔ´ÏîÄ¿ÍйÜÔÚgiteeÉÏ£¬ÎÒÃÇ¿ÉÒÔÔ½·¢Àû±ãµØÖÎÀíºÍ·ÖÏí×Ô¼ºµÄÏîÄ¿£¬Ò²¿ÉÒÔ¼ÓÈë¸üÆÕ±éµÄ¿ªÔ´ÉçÇø£¬Îª¿ªÔ´ÊÂÒµ×ö³ö×Ô¼ºµÄТ˳¡£
ÒÔÉϾÍÊÇÔõô½«gitee¿Íջת³É¿ªÔ´µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡