Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /doc/gitlab-basics/start-using-git.md
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'doc/gitlab-basics/start-using-git.md')
-rw-r--r--doc/gitlab-basics/start-using-git.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md
index c6de723246c..875bd00ee55 100644
--- a/doc/gitlab-basics/start-using-git.md
+++ b/doc/gitlab-basics/start-using-git.md
@@ -148,7 +148,7 @@ between your computer and GitLab.
```
1. GitLab requests your username and password:
- - If you have 2FA enabled for your account, you must use a [Personal Access Token](../user/profile/personal_access_tokens.md)
+ - If you have 2FA enabled for your account, you must [clone using a token](#clone-using-a-token)
with `read_repository` or `write_repository` permissions instead of your account's password.
- If you don't have 2FA enabled, use your account's password.
@@ -163,6 +163,24 @@ On Windows, if you enter your password incorrectly multiple times and an `Access
add your namespace (username or group) to the path:
`git clone https://namespace@gitlab.com/gitlab-org/gitlab.git`.
+#### Clone using a token
+
+Clone with HTTPS using a token if:
+
+- You want to use 2FA.
+- You want to have a revokable set of credentials scoped to one or more repositories.
+
+You can use any of these tokens to authenticate when cloning over HTTPS:
+
+- [Personal access tokens](../user/profile/personal_access_tokens.md).
+- [Deploy tokens](../user/project/deploy_tokens/index.md).
+- [Project access tokens](../user/project/settings/project_access_tokens.md).
+- [Group access tokens](../user/group/settings/group_access_tokens.md).
+
+```shell
+git clone https://<username>:<token>@gitlab.example.com/tanuki/awesome_project.git
+```
+
### Convert a local directory into a repository
You can initialize a local folder so Git tracks it as a repository.