You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/book/04-git-server/chapter4.asc
+24-38Lines changed: 24 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -609,19 +609,18 @@ GitLab is a fully open-source project (the project page can be found at http://w
609
609
There are several options for obtaining and using GitLab:
610
610
611
611
1. The Community Edition is the basic product, and is offered free of charge.
612
-
You install the software on your machine, and you're in charge of configuring and updating it.
613
-
No money changes hands, the software is entirely open-source.
614
-
2. The Enterprise Edition extends the Community Edition with some extra features, and is available under a subscription plan.
612
+
You install the software on your machine, and you're responsible for configuring and updating it.
613
+
2. The Enterprise Edition extends the Community Edition with some extra features, and is available through a subscription plan.
615
614
Your subscription fees pay for installation and configuration support, ongoing technical support, and continued GitLab development.
616
615
3. GitLab Cloud is an installation of the Community Edition running on GitLab's servers.
617
616
There's no charge for the service, and very few limits on how you use it.
618
-
This is a great way to try GitLab from a user's perspective before expending effort configuring your own server.
617
+
This is a great way to take GitLab for a spin before expending effort configuring your own server.
619
618
620
619
621
620
==== Installation
622
621
623
622
GitLab is a database-backed web application, so its installation is a bit more involved than some other git servers.
624
-
Fortunately, it's also very well-documented and supported.
623
+
Fortunately, this process is very well-documented and supported.
625
624
626
625
There are a few methods you can pursue to install GitLab.
627
626
To get something up and running quickly, you can download a virtual machine image or a one-click installer from https://bitnami.com/stack/gitlab[], and tweak the configuration to match your particular environment.
@@ -639,7 +638,7 @@ There's also ``unofficial'' guidance on getting GitLab running with non-standard
639
638
==== Administration
640
639
641
640
GitLab's administration interface is accessed over the web.
642
-
Simply point your browser to the hostname or IP address of the machine where GitLab is installed, and log in as an admin user.
641
+
Simply point your browser to the hostname or IP address where GitLab is installed, and log in as an admin user.
643
642
The default username is `[email protected]`, and the default password is `5iveL!fe` (which you will be prompted to change as soon as you enter it).
644
643
Once logged in, click the ``Admin area'' icon in the menu at the top right.
645
644
@@ -650,10 +649,9 @@ image::images/gitlab-menu.png[The ``Admin area'' item in the GitLab menu.]
650
649
===== Users
651
650
652
651
Users in GitLab are accounts that correspond to people.
653
-
User accounts don't have a lot of complexity.
654
-
Mainly it's a collection of personal information attached to login data.
652
+
User accounts don't have a lot of complexity; mainly it's a collection of personal information attached to login data.
655
653
Each user account comes with a *namespace*, which is a logical grouping of projects that belong to that user.
656
-
If the user +jane+ had a project named +project+, that project's url would be http://hostname.tld/jane/project[].
654
+
If the user +jane+ had a project named +project+, that project's url would be http://server/jane/project[].
657
655
658
656
[[gitlab_users]]
659
657
.The GitLab user administration screen.
@@ -669,14 +667,14 @@ This is obviously a much more permanent and destructive action, and its uses are
669
667
===== Groups
670
668
671
669
A GitLab group is an assemblage of projects, along with data about how users can access those projects.
672
-
Each group is a project namespace (the same way that users are), so if the group +training+ had a project +materials+, its url would be http://hostname.tld/training/materials[].
670
+
Each group has a project namespace (the same way that users do), so if the group +training+ has a project +materials+, its url would be http://server/training/materials[].
673
671
674
672
[[gitlab_groups]]
675
673
.The GitLab group administration screen.
676
674
image::images/gitlab-groups.png[The GitLab group administration screen.]
677
675
678
676
Each group is associated with a number of users, each of which has a level of permissions for the group's projects and the group itself.
679
-
These range from ``Guest'' (issues and chat only) to ``Owner'' (full control of the group and its projects).
677
+
These range from ``Guest'' (issues and chat only) to ``Owner'' (full control of the group, its members, and its projects).
680
678
The types of permissions are too numerous to list here, but GitLab has a helpful link on the administration screen.
681
679
682
680
===== Projects
@@ -685,70 +683,58 @@ A GitLab project roughly corresponds to a single git repository.
685
683
Every project belongs to a single namespace, either a user or a group.
686
684
If the project belongs to a user, the owner of the project has direct control over who has access to the project; if the project belongs to a group, the group's user-level permissions will also take effect.
687
685
688
-
Every project has a visibility level, which controls who has read access to that project's pages and repository.
686
+
Every project also has a visibility level, which controls who has read access to that project's pages and repository.
689
687
If a project is _Private_, the project's owner must explicitly grant access to specific users.
690
688
An _Internal_ project is visible to any logged-in user, and a _Public_ project is visible to anyone.
691
689
Note that this controls both git "fetch" access as well as access to the web UI for that project.
692
690
693
-
Projects can also have labels, which can help organize projects across namespaces.
694
-
The projects dashboard page can filter the displayed repositories by one or more labels.
695
-
This is helpful if you have a large number of projects in different groups, but that relate in some way.
691
+
===== Hooks
696
692
697
-
===== Other Tools
698
-
699
-
GitLab includes support for *Hooks*, both at a project or system level.
693
+
GitLab includes support for hooks, both at a project or system level.
700
694
For either of these, the GitLab server will perform an HTTP POST with some descriptive JSON whenever relevant events occur.
701
695
This is a great way to connect your git repositories and GitLab instance to the rest of your development automation, such as CI servers, chat rooms, or deployment tools.
702
696
703
-
The *Message* feature is useful to broadcast information about the system to all users.
704
-
A maximum of one message is visible at any given time, and every message has a window of time during which it is visible to any user (including anonymous ones).
705
-
706
-
[[gitlab_message]]
707
-
.How a message is displayed.
708
-
image::images/gitlab-broadcast.png[How a message is displayed.]
709
-
710
-
This is typically used for system status information (_"The server will be undergoing maintenance…"_), but administrative users have full control over the content and color scheme.
711
-
712
-
==== Basic Operation
697
+
==== Basic Usage
713
698
714
699
The first thing you'll want to do with GitLab is create a new project.
715
700
This is accomplished by clicking the ``+'' icon on the toolbar.
716
701
You'll be asked for the project's name, which namespace it should belong to, and what its visibility level should be.
717
702
Most of what you specify here isn't permanent, and can be re-adjusted later through the settings interface.
718
703
Click ``Create Project'', and you're done.
719
704
720
-
Once the project is created, you'll probably want to connect it with a local Git repository.
705
+
Once the project exists, you'll probably want to connect it with a local Git repository.
721
706
Each project is accessible over HTTPS or SSH, either of which can be used to configure a Git remote.
722
707
The URLs are visible at the top of the project's home page.
723
708
For an existing local repository, this command will create a remote named `gitlab` to the hosted location:
If you don't have a local copy of the repository, you can simply do this:
728
713
729
-
git clone <url>
730
-
714
+
git clone https://server/namespace/project.git
731
715
732
-
The web UI provides access to many useful views of the repository itself.
716
+
The web UI provides access to several useful views of the repository itself.
733
717
Each project's home page shows recent activity, and links along the top will lead you to views of the project's files and commit log.
734
718
735
719
==== Working Together
736
720
737
-
The most basic way of working together on a GitLab project is by giving another user direct push access to the git repository.
738
-
You can add another user to a project by going to the ``Members'' section of that project's settings, and associating the new user with an access level (the different access levels are discussed a bit in <<_gitlab_groups_section>>).
721
+
The simplest way of working together on a GitLab project is by giving another user direct push access to the git repository.
722
+
You can add a user to a project by going to the ``Members'' section of that project's settings, and associating the new user with an access level (the different access levels are discussed a bit in <<_gitlab_groups_section>>).
739
723
By giving a user an access level of ``Developer'' or above, that user can push commits and branches directly to the repository with impunity.
740
724
741
-
Another, more isolated way of collaboration is by using merge requests.
725
+
Another, more decoupled way of collaboration is by using merge requests.
742
726
This feature enables any user that can see a project to contribute to it in a controlled way.
743
727
Users with direct access can simply create a branch, push commits to it, and open a merge request from their branch back into `master` or any other branch.
744
728
Users who don't have push permissions for a repository can ``fork'' it (create their own copy), push commits to _that_ copy, and open a merge request from their fork back to the main project.
745
729
This model allows the owner to be in full control of what goes into the repository and when, while allowing contributions from untrusted users.
746
730
747
731
Merge requests and issues are the main units of long-lived discussion in GitLab.
748
-
Each merge request allows a line-by-line discussion of the proposed change, as well as a general overall discussion thread.
732
+
Each merge request allows a line-by-line discussion of the proposed change (which supports a lightweight kind of code review), as well as a general overall discussion thread.
749
733
Both can be assigned to users, or organized into milestones.
750
734
751
-
* The Wall
735
+
This section has focused mainly on the Git-related parts of GitLab, but it's a fairly mature system, and provides many other features that can help your team work together.
736
+
These include project wikis, discussion ``walls'', and system maintenance tools.
737
+
One benefit to GitLab is that, once the server is set up and running, you'll rarely need to tweak a configuration file or access the server via SSH; most administration and general usage can be accomplished through the in-browser interface.
0 commit comments