docs: clarify HTTPS auth with 2FA (#784)

## Summary
- clarify that HTTPS Git auth should use an access token as the password when 2FA is enabled
- update both the first repository guide and the CLI clone/commit guide for consistency

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/784
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
mukunda katta 2026-05-05 10:41:45 +02:00 committed by Gusted
parent 5b48c54304
commit 64e97c1190
2 changed files with 5 additions and 3 deletions

View file

@ -366,7 +366,8 @@ The `-u` option sets the upstream remote, which we want to be Codeberg.org, as c
The `main` argument sets the name of the branch onto which shall be pushed upstream.
For this example, it should be the same branch name that you specified when creating the repository.
When connecting via HTTPS, Git will ask you for your username and password, which you can enter interactively.
When connecting via HTTPS, Git will ask you for your username and password.
If you have enabled Two-Factor Authentication, use your generated [access token](/advanced/access-token/) as the password instead.
After refreshing the repository page, you should now see something similar to this:

View file

@ -92,8 +92,9 @@ Here's an explanation of the command flags used here:
The last step is to synchronize (_push_) the commit from the local repository to the remote one on Codeberg.
If you are using HTTPS, you will be asked for your Codeberg username and password. If you want to avoid entering your
password every time, consider [using SSH](/security/ssh-key) instead.
If you are using HTTPS, you will be asked for your Codeberg username and password.
If you have enabled Two-Factor Authentication, use your generated [access token](/advanced/access-token/) as the password instead.
If you want to avoid entering your password every time, consider [using SSH](/security/ssh-key) instead.
```shell
~/examples$ git push