[PATCH v5 4/4] docs: make the purpose of using app password for Gmail more clear in send-email
- From
Aditya Garg <gargaditya08@live.com>
- Date
- May 28, 2025, 07:05 UTC
- Message-ID
- <20250528070521.17379-5-gargaditya08@live.com>
- In-Reply-To
- <20250528070521.17379-1-gargaditya08@live.com>
The current example for Gmail suggests using app passwords for send-email if user has multi-factor authentication set up for their account. However, it does not clarify that the user cannot use their normal password in case they do not have multi-factor authentication enabled. Most likely the example was written in the days when Google allowed using normal passwords without multi-factor authentication.
This commit clarifies that app passwords are required and suggests using OAuth2 if the user does not want to enable multi-factor authentication. --- Documentation/git-send-email.adoc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc index aff0861d29..99c126cd5a 100644 --- a/Documentation/git-send-email.adoc +++ b/Documentation/git-send-email.adoc @@ -524,9 +524,12 @@ edit `~/.gitconfig` to specify your account settings: smtpServerPort = 587 ---- +Gmail does not allow using your account password for `git send-email`. If you have multi-factor authentication set up on your Gmail account, you can generate an app-specific password for use with `git send-email`. Visit https://security.google.com/settings/security/apppasswords to create it. +If you do not want to enable multi-factor authentication, you can use OAuth2.0 +authentication as described below. You can also use OAuth2.0 authentication with Gmail. `OAUTHBEARER` and `XOAUTH2` are common methods used for this type of authentication. Gmail
-- 2.43.0