GitLab create a warehouse Warehouse Management

 

 

Gitlab Warehouse Management

GitLab is through the concept of group (group) to the unified management of the warehouse (project) and the user (user), by creating a group, and then create a warehouse in the group, and then added to the user group, enabling the user rights management and warehouse

Create a group before creating a warehouse

 

Create a group creategroup

In the Admin page, click the top of the page Admin area to enter the admin area

On the right side of the page click on the green button New group, create a group to enter the page:

 

 

 In the Create Group page, set the path and group name is required, and this two good consistent content:

 

 

 The same path name of the group and the group, describing the group can not write write

Note: visibility Level: Select who can access the group: We default to select private, 

Private: Only authorized users can see the user-assigned
Internal: Log gitlab as long as the user can see the
Public: gitlab web pages can be accessed as long as people can see


create group button under the page to complete the group's creation, into the Group Management page

 

 

 

 

 

 

 We can add users to the group page. There is a default administrator user

 

Create a user createuser

In the Admin page, click the top of the page Admin area to enter the admin area

 

On the right side of the page click on the green button New user, create a user to enter the page: 

 

 

 In the Create User page, enter a user name nickname, user name, e-mail, select the user level

 

 

 Users create dev

 

 

 

Click the bottom of the page create user button to complete the user to create, enter the user management page 

 

 

 

 

 

 

Top right of the page, click Edit Page button, set the initial password for the user

On this page, users can also modify the registration information.

Let ordinary users to build group

 

 

 Press Save

 

Analog user login

 

 

This simulated user login

 

User authorization (grantuser)

After the user is created, we need to authorize users, so that users can manage the warehouse, there are two ways,
one is added to the user group, so that users can warehouse in the management group,

Second, direct user authorized warehouse management. We use the usual way is to join the appropriate user groups and given different roles. GitLab user's role in the system is defined, can not be changed. It may not meet our normal habits of thought.

Below we will dev user you just created to add to our test group, will give the developer permission


In the admin area,

 

 

 Click the test group, enter the group management page:

 

 

 

Select the dev user we just created, select the developer role, and then added to the group: 

 

 

 Added

 

 

 

master and owner of the warehouse manager permissions

Note: For each role corresponding permissions can be found in the official documentation related content:
https://docs.gitlab.com/ee/user/permissions.html

 

Creating a warehouse (createproject)

In GitLab, you can create a project to store your code, as an issue tracker, code for collaboration, for building continuous integration, testing and deployment.

In the admin area click on the New project button, or click select New project options in the navigation bar,

 

 

 Into the new project page,

You can create an empty warehouse

 

 

Template to build warehouse

 

 

 

 

 

 

 

Select the warehouse belongs to the group, enter the name of the warehouse, the warehouse description, choose the level of visibility, you can create a complete warehouse.

 

 

 

The same permission level permission levels and groups 

 

Note: visibility Level: Select who can access the group: We default to select private, 

 

Private: Only authorized users can see the user-assigned
Internal: Log gitlab as long as the user can see the
Public: gitlab web pages can be accessed as long as people can see

 

 

Enter the warehouse main page : the left part of the page to warehouse operations related to the menu bar to show how the line connecting the warehouse in command, not empty warehouse contents displayed on the right side empty warehouse.


 

 

 

 

Command line instructions 命令行怎么处理

Git global setup 全局配置
git config --global user.name "Administrator"
git config --global user.email "[email protected]
Create a new repository 创建空的仓库

如果新的仓库没有,本地没有仓库,可以克隆仓库到本地

 

git clone http://192.168.31.11/test/git_test.git
// 进入仓库
cd git_test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

 

Existing folder 
本地如果存在一个文件夹,不是存在一个仓库
// 到这个文件夹
cd existing_folder
// 初始化仓库
git init
// 添加远程仓库
git remote add origin http://192.168.31.11/test/git_test.git
git add .
git commit -m "Initial commit"
git push -u origin master

 

Existing Git repository

本地存在仓库

 

// 进入到这个仓库
cd existing_repo 
// 添加远程仓库 到gitlab 的仓库
git remote rename origin old-origin
git remote add origin http://192.168.31.11/test/git_test.git
git push -u origin --all
git push -u origin --tags

 

 

 

当把仓库加到组里面,组里面对应用户就可以管理这个组

 

回到管理员区域 点击dev用户

 

 

模拟dev用户登录

 

 我们将 git_test 仓库加入到test 组后,组内的成员即可以看到该仓库,我们使用dev 用户登录,即可看到该仓库。

 

 

这样就是基本完成一个仓库的创建,首先创建了组,创建了用户,把用户加入到这个组里面,然后创建了一个仓库,把仓库属于这个组

 

Guess you like

Origin www.cnblogs.com/mingerlcm/p/12589781.html