github repository migration to gitlab and gitlab warehouse migrate to another server gitlab

A. Github repository migrated to gitlab

First enter the new project:

 

Select Import project, select the following github:

 

 

After entering, there is a need for personal access token github, github click below to jump to the page for token token:

 

Select Create a new token:

 

 

Fill some token of descriptive information, check first repo:

 

Once created, copied token, keep it, because then you'll never see it this token, token name only description of:

 

 Copy the above token to fill gitlab, and then view the list of available:

 

Select to import gitlab warehouse, click Import:

 

 Successfully imported:

 

 

If the following error:

 

Check that the imported gitlab warehouse is private, you may need to change public:

 

 

II. Gitlab migration between servers

Gitlab migrating from one server to another, such as migrating from gitlab.com to their gitlab server.

The following figure, the first export in gitlab.com code corresponds to the warehouse (including all branches and history, labels, etc.), gitlab will send a download link to your email address, just click the next download.

 

Download Link successfully sent to the mailbox:

 

The message reads as follows:

 

 

Once you have downloaded, you can to your own website gitlab server, create a new project:

 

Select the first embodiment introduced from gitlab export package:

Fill in the warehouse of information, just upload download messages warehouse package:

 

Wait import:

 The import was successful:

 

III. Changing remote repository address

You may need to change the local address of the remote repository after migration:

更改远程仓库地址:
git remote set-url origin 仓库地址
例如:
git remote set-url origin [email protected]:frontend/scaffold/gulp.git 

更改完毕验证:
git remote -v

 

Guess you like

Origin www.cnblogs.com/saysmy/p/10942814.html