index.md 18.9 KB
Newer Older
1 2 3
---
stage: Create
group: Source Code
4
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments"
5 6 7
type: reference
---

8 9 10 11 12 13 14 15 16 17
# Projects

In GitLab, you can create projects for hosting
your codebase, use it as an issue tracker, collaborate on code, and continuously
build, test, and deploy your app with built-in GitLab CI/CD.

Your projects can be [available](../../public_access/public_access.md)
publicly, internally, or privately, at your choice. GitLab does not limit
the number of private projects you create.

18
## Project features
19 20 21 22

When you create a project in GitLab, you'll have access to a large number of
[features](https://about.gitlab.com/features/):

23
**Repositories:**
24 25 26

- [Issue tracker](issues/index.md): Discuss implementations with your team within issues
  - [Issue Boards](issue_board.md): Organize and prioritize your workflow
27
  - [Multiple Issue Boards](issue_board.md#multiple-issue-boards): Allow your teams to create their own workflows (Issue Boards) for the same project
28
- [Repositories](repository/index.md): Host your code in a fully
29
  integrated platform
30 31
  - [Branches](repository/branches/index.md): use Git branching strategies to
  collaborate on code
32 33 34 35
  - [Protected branches](protected_branches.md): Prevent collaborators
  from messing with history or pushing code without review
  - [Protected tags](protected_tags.md): Control over who has
  permission to create tags, and prevent accidental update or deletion
36
  - [Repository mirroring](repository/repository_mirroring.md)
37
  - [Signing commits](repository/gpg_signed_commits/index.md): use GPG to sign your commits
38
  - [Deploy tokens](deploy_tokens/index.md): Manage project-based deploy tokens that allow permanent access to the repository and Container Registry.
39
- [Web IDE](web_ide/index.md)
40 41
- [CVE ID Requests](../application_security/cve_id_request.md): Request a CVE identifier to track a
  vulnerability in your project.
42 43 44 45 46

**Issues and merge requests:**

- [Issue tracker](issues/index.md): Discuss implementations with your team within issues
  - [Issue Boards](issue_board.md): Organize and prioritize your workflow
47
  - [Multiple Issue Boards](issue_board.md#multiple-issue-boards): Allow your teams to create their own workflows (Issue Boards) for the same project
48
- [Merge Requests](merge_requests/index.md): Apply your branching
49
  strategy and get reviewed by your team
50
  - [Merge Request Approvals](merge_requests/merge_request_approvals.md): Ask for approval before
51
  implementing a change **(STARTER)**
52
  - [Fix merge conflicts from the UI](merge_requests/resolve_conflicts.md):
53
  Your Git diff tool right from the GitLab UI
54 55 56
  - [Review Apps](../../ci/review_apps/index.md): Live preview the results
  of the changes proposed in a merge request in a per-branch basis
- [Labels](labels.md): Organize issues and merge requests by labels
57
- [Time Tracking](time_tracking.md): Track estimate time
58
  and time spent on
59 60 61
  the conclusion of an issue or merge request
- [Milestones](milestones/index.md): Work towards a target date
- [Description templates](description_templates.md): Define context-specific
62
  templates for issue and merge request description fields for your project
63
- [Slash commands (quick actions)](quick_actions.md): Textual shortcuts for
64
  common actions on issues or merge requests
65 66 67
- [Autocomplete characters](autocomplete_characters.md): Autocomplete
  references to users, groups, issues, merge requests, and other GitLab
  elements.
68
- [Web IDE](web_ide/index.md)
69 70 71

**GitLab CI/CD:**

72
- [GitLab CI/CD](../../ci/README.md): the GitLab built-in [Continuous Integration, Delivery, and Deployment](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/) tool
73
  - [Container Registry](../packages/container_registry/index.md): Build and push Docker
74
  images out-of-the-box
75
  - [Auto Deploy](../../topics/autodevops/stages.md#auto-deploy): Configure GitLab CI/CD
76
  to automatically set up your app's deployment
Marcel Amirault's avatar
Marcel Amirault committed
77
  - [Enable and disable GitLab CI/CD](../../ci/enable_or_disable_ci.md)
78
  - [Pipelines](../../ci/pipelines/index.md): Configure and visualize
79
    your GitLab CI/CD pipelines from the UI
80
    - [Scheduled Pipelines](../../ci/pipelines/schedules.md): Schedule a pipeline
81
      to start at a chosen time
82
    - [Pipeline Graphs](../../ci/pipelines/index.md#visualize-pipelines): View your
83
      entire pipeline from the UI
84
    - [Job artifacts](../../ci/pipelines/job_artifacts.md): Define,
85
      browse, and download job artifacts
86
    - [Pipeline settings](../../ci/pipelines/settings.md): Set up Git strategy (choose the default way your repository is fetched from GitLab in a job),
87
      timeout (defines the maximum amount of time in minutes that a job is able run), custom path for `.gitlab-ci.yml`, test coverage parsing, pipeline's visibility, and much more
88
  - [Kubernetes cluster integration](clusters/index.md): Connecting your GitLab project
89
    with a Kubernetes cluster
90
  - [Feature Flags](../../operations/feature_flags.md): Feature flags allow you to ship a project in
91
    different flavors by dynamically toggling certain functionality **(PREMIUM)**
92
- [GitLab Pages](pages/index.md): Build, test, and deploy your static
93
  website with GitLab Pages
94 95 96

**Other features:**

97 98
- [Wiki](wiki/index.md): document your GitLab project in an integrated Wiki.
- [Snippets](../snippets.md): store, share and collaborate on code snippets.
99
- [Value Stream Analytics](../analytics/value_stream_analytics.md): review your development lifecycle.
100
- [Insights](insights/index.md): configure the Insights that matter for your projects. **(ULTIMATE)**
101
- [Security Dashboard](../application_security/security_dashboard/index.md): Security Dashboard. **(ULTIMATE)**
102
- [Syntax highlighting](highlighting.md): an alternative to customize
103
  your code blocks, overriding the GitLab default choice of language.
104 105
- [Badges](badges.md): badges for the project overview.
- [Releases](releases/index.md): a way to track deliverables in your project as snapshot in time of
Amy Qualls's avatar
Amy Qualls committed
106
  the source, build output, other metadata, and other artifacts
107
  associated with a released version of your code.
108 109 110
- [Conan packages](../packages/conan_repository/index.md): your private Conan repository in GitLab.
- [Maven packages](../packages/maven_repository/index.md): your private Maven repository in GitLab.
- [NPM packages](../packages/npm_registry/index.md): your private NPM package registry in GitLab.
111
- [Code owners](code_owners.md): specify code owners for certain files **(STARTER)**
112
- [License Compliance](../compliance/license_compliance/index.md): approve and deny licenses for projects. **(ULTIMATE)**
113
- [Dependency List](../application_security/dependency_list/index.md): view project dependencies. **(ULTIMATE)**
114
- [Requirements](requirements/index.md): Requirements allow you to create criteria to check your products against. **(ULTIMATE)**
Marcia Ramos's avatar
Marcia Ramos committed
115
- [Static Site Editor](static_site_editor/index.md): quickly edit content on static websites without prior knowledge of the codebase or Git commands.
116
- [Code Intelligence](code_intelligence.md): code navigation features.
117

118
### Project integrations
119 120 121 122 123 124 125 126 127 128

[Integrate your project](integrations/index.md) with Jira, Mattermost,
Kubernetes, Slack, and a lot more.

## New project

Learn how to [create a new project](../../gitlab-basics/create-project.md) in GitLab.

### Fork a project

129
You can [fork a project](repository/forking_workflow.md) in order to:
130 131

- Collaborate on code by forking a project and creating a merge request
132
  from your fork to the upstream project
133 134
- Fork a sample project to work on the top of that

135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
### Star a project

You can star a project to make it easier to find projects you frequently use.
The number of stars a project has can indicate its popularity.

To star a project:

1. Go to the home page of the project you want to star.
1. In the upper right corner of the page, click **Star**.

To view your starred projects:

1. Click **Projects** in the navigation bar.
1. Click **Starred Projects**.
1. GitLab displays information about your starred projects, including:

   - Project description, including name, description, and icon
   - Number of times this project has been starred
   - Number of times this project has been forked
   - Number of open merge requests
   - Number of open issues

157 158 159 160 161 162 163 164 165 166 167
### Explore projects

You can explore other popular projects available on GitLab. To explore projects:

1. Click **Projects** in the navigation bar.
1. Click **Explore Projects**.

GitLab displays a list of projects, sorted by last updated date. To view
projects with the most [stars](#star-a-project), click **Most stars**. To view
projects with the largest number of comments in the past month, click **Trending**.

168 169
## Project settings

170
Set the project's visibility level and the access levels to its various pages
171 172
and perform actions like archiving, renaming or transferring a project.

173 174
Read through the documentation on [project settings](settings/index.md).

175 176
## Import or export a project

177 178
- [Import a project](import/index.md) from:
  - [GitHub to GitLab](import/github.md)
179
  - [Bitbucket to GitLab](import/bitbucket.md)
180 181
  - [Gitea to GitLab](import/gitea.md)
  - [FogBugz to GitLab](import/fogbugz.md)
182 183 184
- [Export a project from GitLab](settings/import_export.md#exporting-a-project-and-its-data)
- [Importing and exporting projects between GitLab instances](settings/import_export.md)

185
## Delete a project
186

187
To delete a project, first navigate to the home page for that project.
188 189 190

1. Navigate to **Settings > General**.
1. Expand the **Advanced** section.
191 192
1. Scroll down to the **Delete project** section.
1. Click **Delete project**
193 194
1. Confirm this action by typing in the expected text.

195
Projects in personal namespaces are deleted immediately on request. For information on delayed deletion of projects within a group, please see [Enabling delayed project removal](../group/index.md#enabling-delayed-project-removal).
196

197
## CI/CD for external repositories **(PREMIUM)**
198 199 200 201

Instead of importing a repository directly to GitLab, you can connect your repository
as a CI/CD project.

202
Read through the documentation on [CI/CD for external repositories](../../ci/ci_cd_for_external_repos/index.md).
203

204
## Project members
205 206 207

Learn how to [add members to your projects](members/index.md).

208 209 210 211 212 213 214
## Project activity

To view the activity of a project, navigate to **Project overview > Activity**.
From there, you can click on the tabs to see **All** the activity, or see it
filtered by **Push events**, **Merge events**, **Issue events**, **Comments**,
**Team**, and **Wiki**.

215
### Leave a project
216 217 218 219 220 221

**Leave project** will only display on the project's dashboard
when a project is part of a group (under a
[group namespace](../group/index.md#namespaces)).
If you choose to leave a project you will no longer be a project
member, therefore, unable to contribute.
222

223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
## Project's landing page

The project's landing page shows different information depending on
the project's visibility settings and user permissions.

For public projects, and to members of internal and private projects
with [permissions to view the project's code](../permissions.md#project-members-permissions):

- The content of a
  [`README` or an index file](repository/#repository-readme-and-index-files)
  is displayed (if any), followed by the list of directories within the
  project's repository.
- If the project doesn't contain either of these files, the
  visitor will see the list of files and directories of the repository.

For users without permissions to view the project's code:

- The wiki homepage is displayed, if any.
- The list of issues within the project is displayed.

243 244 245 246 247 248 249 250
## GitLab Workflow - VS Code extension

To avoid switching from the GitLab UI and VS Code while working in GitLab repositories, you can integrate
the [VS Code](https://code.visualstudio.com/) editor with GitLab through the
[GitLab Workflow extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow).

To review or contribute to the extension's code, visit [its codebase in GitLab](https://gitlab.com/gitlab-org/gitlab-vscode-extension/).

251 252 253 254 255 256 257 258
## Redirects when changing repository paths

When a repository path changes, it is essential to smoothly transition from the
old location to the new one. GitLab provides two kinds of redirects: the web UI
and Git push/pull redirects.

Depending on the situation, different things apply.

259
When [renaming a user](../profile/index.md#changing-your-username),
260
[changing a group path](../group/index.md#changing-a-groups-path) or [renaming a repository](settings/index.md#renaming-a-repository):
261 262 263 264 265 266 267 268 269

- Existing web URLs for the namespace and anything under it (e.g., projects) will
  redirect to the new URLs.
- Starting with GitLab 10.3, existing Git remote URLs for projects under the
  namespace will redirect to the new remote URL. Every time you push/pull to a
  repository that has changed its location, a warning message to update
  your remote will be displayed instead of rejecting your action.
  This means that any automation scripts, or Git clients will continue to
  work after a rename, making any transition a lot smoother.
270 271
- The redirects will be available as long as the original path is not claimed by
  another group, user or project.
Evan Read's avatar
Evan Read committed
272 273 274

## Use your project as a Go package

275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
Any project can be used as a Go package. GitLab responds correctly to `go get`
and `godoc.org` discovery requests, including the
[`go-import`](https://golang.org/cmd/go/#hdr-Remote_import_paths) and
[`go-source`](https://github.com/golang/gddo/wiki/Source-Code-Links) meta tags.

Private projects, including projects in subgroups, can be used as a Go package,
but may require configuration to work correctly. GitLab will respond correctly
to `go get` discovery requests for projects that *are not* in subgroups,
regardless of authentication or authorization.
[Authentication](#authenticate-go-requests) is required to use a private project
in a subgroup as a Go package. Otherwise, GitLab will truncate the path for
private projects in subgroups to the first two segments, causing `go get` to
fail.

GitLab implements its own Go proxy. This feature must be enabled by an
administrator and requires additional configuration. See [GitLab Go
Proxy](../packages/go_proxy/index.md).

### Disable Go module features for private projects

In Go 1.12 and later, Go queries module proxies and checksum databases in the
process of [fetching a
module](../../development/go_guide/dependencies.md#fetching). This can be
selectively disabled with `GOPRIVATE` (disable both),
[`GONOPROXY`](../../development/go_guide/dependencies.md#proxies) (disable proxy
queries), and [`GONOSUMDB`](../../development/go_guide/dependencies.md#fetching)
(disable checksum queries).

`GOPRIVATE`, `GONOPROXY`, and `GONOSUMDB` are comma-separated lists of Go
modules and Go module prefixes. For example,
`GOPRIVATE=gitlab.example.com/my/private/project` will disable queries for that
one project, but `GOPRIVATE=gitlab.example.com` will disable queries for *all*
projects on GitLab.com. Go will not query module proxies if the module name or a
prefix of it appears in `GOPRIVATE` or `GONOPROXY`. Go will not query checksum
databases if the module name or a prefix of it appears in `GONOPRIVATE` or
`GONOSUMDB`.

### Authenticate Go requests

To authenticate requests to private projects made by Go, use a [`.netrc`
file](https://ec.haxx.se/usingcurl-netrc.html) and a [personal access
token](../profile/personal_access_tokens.md) in the password field. **This only
works if your GitLab instance can be accessed with HTTPS.** The `go` command
will not transmit credentials over insecure connections. This will authenticate
all HTTPS requests made directly by Go but will not authenticate requests made
through Git.
Evan Read's avatar
Evan Read committed
321 322 323

For example:

324
```plaintext
325
machine gitlab.example.com
Evan Read's avatar
Evan Read committed
326 327 328
login <gitlab_user_name>
password <personal_access_token>
```
329

330
NOTE:
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
On Windows, Go reads `~/_netrc` instead of `~/.netrc`.

### Authenticate Git fetches

If a module cannot be fetched from a proxy, Go will fall back to using Git (for
GitLab projects). Git will use `.netrc` to authenticate requests. Alternatively,
Git can be configured to embed specific credentials in the request URL, or to
use SSH instead of HTTPS (as Go always uses HTTPS to fetch Git repositories):

```shell
# embed credentials in any request to GitLab.com:
git config --global url."https://${user}:${personal_access_token}@gitlab.example.com".insteadOf "https://gitlab.example.com"

# use SSH instead of HTTPS:
git config --global url."git@gitlab.example.com".insteadOf "https://gitlab.example.com"
```

348 349
## Access project page with project ID

350
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/53671) in GitLab 11.8.
351 352 353

To quickly access a project from the GitLab UI using the project ID,
visit the `/projects/:id` URL in your browser or other tool accessing the project.
354

355
## Project aliases **(PREMIUM SELF)**
356

357
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3264) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.1.
358

359 360 361 362
When migrating repositories to GitLab and they are being accessed by other systems,
it's very useful to be able to access them using the same name especially when
they are a lot. It reduces the risk of changing significant number of Git URLs in
a large number of systems.
363

364 365 366 367 368 369 370 371
GitLab provides a functionality to help with this. In GitLab, repositories are
usually accessed with a namespace and project name. It is also possible to access
them via a project alias. This feature is only available on Git over SSH.

A project alias can be only created via API and only by GitLab administrators.
Follow the [Project Aliases API documentation](../../api/project_aliases.md) for
more details.

372 373 374 375
Once an alias has been created for a project (e.g., an alias `gitlab` for the
project `https://gitlab.com/gitlab-org/gitlab`), the repository can be cloned
using the alias (e.g `git clone git@gitlab.com:gitlab.git` instead of
`git clone git@gitlab.com:gitlab-org/gitlab.git`).
376

377
## Project activity analytics overview **(ULTIMATE SELF)**
378 379 380 381 382 383 384 385 386

> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/279039) in GitLab [Ultimate](https://about.gitlab.com/pricing/) 13.7 as a [Beta feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#beta).

Project details include the following analytics:

- Deployment Frequency

For more information, see [Project Analytics API](../../api/project_analytics.md).

387 388 389 390 391 392
## Project APIs

There are numerous [APIs](../../api/README.md) to use with your projects:

- [Badges](../../api/project_badges.md)
- [Clusters](../../api/project_clusters.md)
393
- [Threads](../../api/discussions.md)
394 395 396 397 398 399 400 401 402 403 404 405
- [General](../../api/projects.md)
- [Import/export](../../api/project_import_export.md)
- [Issue Board](../../api/boards.md)
- [Labels](../../api/labels.md)
- [Markdown](../../api/markdown.md)
- [Merge Requests](../../api/merge_requests.md)
- [Milestones](../../api/milestones.md)
- [Services](../../api/services.md)
- [Snippets](../../api/project_snippets.md)
- [Templates](../../api/project_templates.md)
- [Traffic](../../api/project_statistics.md)
- [Variables](../../api/project_level_variables.md)
406
- [Aliases](../../api/project_aliases.md)
407
- [Analytics](../../api/project_analytics.md)