Home >Development Tools >git >Detailed explanation of how companies register Gitlab and create projects
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!
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.
After taking over the project, we need to clone
to the local area and modify the code as needed push
Come 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.
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"
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
ssh key
Enter the commandssh-keygen -t rsa -C 'Mailbox'
, just press Enter all the way.
id_rsa and
id_rsa.pub## will be generated under the ~/.ssh
folder. #Execute the following command to enter ssh, and then open the
file. The content of this file is the ssh key
<pre class="brush:php;toolbar:false;">cd ~/.ssh
cat id_rsa.pub</pre>## we need to configure.
#Configuration
ssh key
Return to the github paneledit 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
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.
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
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:
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!