Home > Development Tools > git > body text

Detailed explanation of how companies register Gitlab and create projects

青灯夜游
Release: 2023-03-24 19:22:51
forward
1996 people have browsed it

How to register Gitlab in an enterprise? How to create a company project? The following article will introduce to you how to register Gitlab and create a company project. I hope it will be helpful to you!

Detailed explanation of how companies register Gitlab and create projects

Login

Generally, the gitlab of an enterprise is private, that is, it is deployed on the enterprise's private server and cannot be accessed from the external network. , such as icode.xiumubai.com/, when you join the company, the company will open a corporate email for you, and you can use this email to log in to the corporate gitlab.

Of course, individuals can also register their own gitlab account. You can visit Gitlab registration link to register.

Now that we have successfully entered the Gitlab panel, the two most common ones are our Group and Project.

Group is a group, which contains many projects. Your leader will invite you to the group where your project is located.

Project is a project, and your Leader will give you the permission to operate the Project. If your level is not very high, you may only have permission to submit code.

Generate SSH KEY

After taking over the project, we need to clone to the local area and modify the code as needed pushCome to the remote warehouse. At this time, you need to grant permissions to the local operation so that we can submit the local code to the remote warehouse. This time involves the configuration of ssh key , the following are the steps.

1. Set user name and user email

Open your terminal and enter the following two lines of commands

git config --global user.name "xiumubai"
git config --global user.email  "xiumubai@qq.com"
Copy after login

Command explanation: The first line is to configure the user name, and the second line is to configure the email address. After the configuration is successful, use git config --list to view the user

This means the configuration is successful

Generatessh key

Enter the commandssh-keygen -t rsa -C 'Mailbox', just press Enter all the way.

##Two files

id_rsa and id_rsa.pub## will be generated under the ~/.ssh folder. #Execute the following command to enter ssh, and then open the

id_rsa.pub

file. The content of this file is the ssh key<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false;">cd ~/.ssh cat id_rsa.pub</pre><div class="contentsignin">Copy after login</div></div>## we need to configure. <p><img src="https://img.php.cn/upload/article/000/000/024/aef491ee8d38049ad3d3bf3ff9f766db-5.png" alt="" loading="lazy">#Configuration</p>ssh key<h2 data-id="heading-4"> <strong><code>Return to the github panel, click on my avatar, and then select

edit profile

After opening, there is SSH Keys

in the left navigation bar, copy and paste

in the input box The content of id_rsa.pub, enter a title, click Add key

After the addition is successful, You can see the added ssh key

Next we can submit our code locally to the remote warehouse. If it is in an enterprise, generally the groups and projects have been created. We just clone

the project, then develop it locally, submit the code to the warehouse, and repeat the process. However, as a developer, you need to understand everything. Let’s simply start by creating a group and project.

Create a group

If you don’t have any groups or projects before, your panel will be very clean

Click Create a group to create a group, enter a personalized name, because duplicate names will be detected here, and then click Create a group at the end to create. Pay attention to the permission control here. Private is a private warehouse, which can only be viewed by those with permission, while Public is accessible to everyone.

Create project

Next we create a Project,

Click New project to create a project. Here we select a blank project

Give the project a name and select Permissions are selected according to your own needs. Generally, in enterprises, you select Private and initialize a REAME.md file. Click Create Project

Project created successfully

Add developer & permissions

Next we add developers to the project. This operation is also the work of the leaders in the company. If you have just entered the company and are at a relatively low level, you do not have this permission to operate.

In Porject information, select Members

After entering the page, click in the upper right corner invite members

In the pop-up window, search for members

based on username or email. Among them, role role identities are The following differences:

  • Guest: Guest role: This role can create issues and make comments in the project but cannot view or modify the GitLab project code.
  • Reporter: Tester of the GitLab project: This role has additional permissions to view and clone the code of the Gitlab project based on the Guest role permissions, but cannot submit the project code, that is, it can only be viewed but not change.
  • Developer: Project developer of GitLab project: This role can clone, develop, and submit project code.
  • Maintainer: GitLab project administrator: This role can create projects, add tags, protect branches, add project members, and edit projects. The core RD leader can grant this authority.
  • Owner: The Git system administrator is Administrator: This role has supreme authority. The development team leader can grant this permission.

Finally select an expiration time, which is chosen based on the actual situation

After setting it, click Invite to add it .

After the addition is successful, you can see the member you just invited in the list. You can set his permissions here or remove him. It is very convenient to manage each developer in the project.

(Learning video sharing: Basic Programming Video)

The above is the detailed content of Detailed explanation of how companies register Gitlab and create projects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!