User manual for gitlab.

Account/Project Application

1. To apply for an account, you need to send an email to the company's email address. Please refer to the following items 2-3 for the sending requirements;

2. In addition to the cc to the public group, the authorization email of the new project warehouse and the new team member needs to be cc to the vp for the authorization of each new person, otherwise the team members of the operation and maintenance group might as well authorize the user;

3. When applying for permission assignment of the project team, the email needs to be cc to the person in charge of the current project and vp, and then the unified authorization of permissions is completed by the members of the operation and maintenance group.

The format for applying for an account/project is

Name:

Position:

Project Team:

warehouse name:

Project manager:

After the account/project is successfully created by the operation and maintenance team, an email notification will be sent, and the feedback email includes the completion status, warehouse name, etc.

Login and change password

In the web interface of gitlab http://ip , enter the account and password to log in

085645252.jpg

If you want to change the password, select My Profile on the right

085734333.jpg

Then select Account

085804706.jpg

Finally, change your password in Password

085831572.jpg

If you forget the password, please send an email to the operation and maintenance team to reset your account password.

SSH Key import

If you want to upload and download the code, you need to import your own ssh key into gitlab, the method is as follows:

1. Copy the content in id_rsa.pub (the opening method is the right mouse button - opening method - notepad);

2. Select My Porfile

085944935.jpg

Select SSH Keys

090020212.jpg

Select Add new

Then copy the contents of the previously copied id_rsa.pub to the key

090109970.jpg

Then choose Save .

Upload/download code

1. Upload (user system is linux)

If the gitlab library is a new library, the interface should be similar to the following interface after opening

090949515.jpg

If uploading code under linux system, first set git global settings

git config --global user.name "Administrator"
git config --global user.email "mail address"

Both user.name and user.email need to enter your own information

Then enter an existing library (for example, your existing library is named test)

cd test

Then use the following

git remote add origin gitlab@ip:root/test.git
git push -u origin master

Please remember that gitlab@ip:root/test.git after origin in the above operation receives the interface information for yourself, not the same as mine.

If the following error occurs during git remote add origin  gitlab@ip:root/test.git

fatal: remote origin already exists.

Then enter the following command

git remote rm origin

then enter the previous command

git remote add origin gitlab@ip:root/test.git

If no error is reported, enter

git push -u origin master

Note, however, that such an operation creates a branch as master, and there is only one branch.

Please pay special attention, if you have many branches locally and want to upload them to the server,

git remote add origin gitlab@ip:root/test.git

Do not proceed to the next step after this step, enter the following command

git push --all

This will upload all branches to the server.

If you also want to upload all your tags to the server, after entering git push --all, enter the following command to upload all tags to the server.

git push --tags

After completion, when opening the web interface, it will appear

091554209.jpg

Not the previous prompt operation interface

Then you can select Files to view current file information

091650836.jpg

You can also select Commits to view commit information

091726771.jpg

2. Download (user system is linux)

When your user system is linux, please find a storage directory (for example, I am in the tmp directory), and then use the git clone gitlab library address to download the library

For example, in the test project just now , the address in gitlab is gitlab@ip:root/test.git

git clone below

091917204.jpg

This means that your git clone is successful.

Please note that if there are multiple branches in the git library, you need to add --bare when downloading, the full format is

git clone --bare git library address

After the download is complete, you can enter the directory, use git branch to check how many branches there are, and use git tag to check how many tags there are.

3. Upload (user system is windows)

If your user system is Windows, please enter the directory that already exists in the repository, then use the git window tool, right-click, and select Git commit-àMaster (the current test branch is Master, if you have other branches, please select OK ), and then enter the corresponding information in the dialog box that appears

092122843.jpg

Enter the appropriate information and select OK

092156664.jpg

The following situations indicate that the operation is completed

092234610.jpg

Then log in to Commits in gitlab, you can see the submitted information

092302997.jpg

If the file needs to be viewed in Files

4. Download (user system is windows)

Find a location under win, and then use git clone to download the address of the project in gitlab above

For example, in the test project just now , the address in gitlab is gitlab@ip:root/test.git

Perform git clone (for example, I am in the E drive)

095321838.jpg

then select ok

if it appears

095426836.jpg

Also select Yes (Y)

then it will appear

095530638.jpg

Prove in git clone your test project

Appears if git clone completes

095606101.jpg

Choose Close

 

Reprinted: http://blog.51cto.com/dl528888/1292316?utm_source=tuicool&utm_medium=referral

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324689984&siteId=291194637