From 64e97c119019001082ce6fd10b1f61bb29c00825 Mon Sep 17 00:00:00 2001 From: mukunda katta Date: Tue, 5 May 2026 10:41:45 +0200 Subject: [PATCH] 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 --- content/getting-started/first-repository.md | 3 ++- content/git/clone-commit-via-cli.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/content/getting-started/first-repository.md b/content/getting-started/first-repository.md index fc23cc8..5bf8afe 100644 --- a/content/getting-started/first-repository.md +++ b/content/getting-started/first-repository.md @@ -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: diff --git a/content/git/clone-commit-via-cli.md b/content/git/clone-commit-via-cli.md index 3825b54..deb60b5 100644 --- a/content/git/clone-commit-via-cli.md +++ b/content/git/clone-commit-via-cli.md @@ -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