mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-08-15 14:53:29 -07:00
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.
This commit is contained in:
parent
0e14351c66
commit
e7fe2eee03
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ Clone with the Git command `clone` followed by the repo URL.
|
||||||
|
|
||||||
### SSH
|
### 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" %}
|
{% 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.
|
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
|
```shell
|
||||||
~$ git clone https://oauth2:token@codeberg.org/user/repo.git
|
~$ git clone https://token@codeberg.org/user/repo.git
|
||||||
Cloning into 'repo'...
|
Cloning into 'repo'...
|
||||||
remote: Enumerating objects: 3, done.
|
remote: Enumerating objects: 3, done.
|
||||||
remote: Counting objects: 100% (3/3), done.
|
remote: Counting objects: 100% (3/3), done.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue