From e7fe2eee031357839528e9f4728f0b48b138ec1c Mon Sep 17 00:00:00 2001 From: Mark Pitblado Date: Mon, 3 Feb 2025 06:31:38 -0800 Subject: [PATCH] docs: clarify oauth2 requirement and read/write Addresses feedback that oauth2 is not required, and that the token itself can serve as the username. Clarifies that read access is all that is required for fetching. --- content/git/clone-commit-via-cli.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/git/clone-commit-via-cli.md b/content/git/clone-commit-via-cli.md index c7e4eea..fcd14df 100644 --- a/content/git/clone-commit-via-cli.md +++ b/content/git/clone-commit-via-cli.md @@ -19,7 +19,7 @@ Clone with the Git command `clone` followed by the repo URL. ### SSH -SSH is the recommended method to use to access your online repository. Before you are able to access Git repositories via SSH, you need to [add an SSH key to your account](/security/ssh-key). +Before you are able to access Git repositories via SSH, you need to [add an SSH key to your account](/security/ssh-key). {% admonition "warning" %} @@ -52,10 +52,10 @@ remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), 214 bytes | 1024 bytes/s, done. ``` -If you wish to clone a private repository, simply add an [access token](/advanced/access-token/) from your account into the URL passed to `git clone`. You only need to scope the access token to have read/write access to repositories for this operation. +If you wish to clone a private repository, simply add an [access token](/advanced/access-token/) from your account into the URL passed to `git clone`. If you only wish to fetch repositories, the token only needs read access. If you wish to push to the repository and have 2FA enabled, write access is needed. ```shell -~$ git clone https://oauth2:token@codeberg.org/user/repo.git +~$ git clone https://token@codeberg.org/user/repo.git Cloning into 'repo'... remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done.