git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Gmail OAuth2 in git send-email

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Jun 3, 2021, 05:02 UTC
Message-ID
<d93a3024-ba8d-3469-2dba-2e0032334232@gmail.com>
Hi,

For most email providers, adding following .gitconfig is enough to seamlessly use git send-email:

Show 5 quoted lines
>            [sendemail]
>                    smtpEncryption = tls
>                    smtpServer = <server>
>                    smtpUser = <email>
>                    smtpServerPort = 587

But for users that use Gmail (like me), we must either enable 2FA and generate app-specific password for use with git send-email, or enable less-secure app access. That's because Gmail prefers authenticating with OAuth2, but git send-email use plain text authentication instead.

I personally prefer the latter because I know that I enabled less-secure app access only for duration of sending patches with git send-email (that is, I switched the trigger when I run git send-email).

We wonder whether git send-email can support Gmail OAuth2 so that we can seamlessly send patches without having to choose either action. But however, we have to create a GCP project [1] first in order to enable Gmail API. This can be overkill for some folks, but unfortunately that's the only way.

If we want to enable support for Gmail OAuth2, should we hands-off API configuration to git send-email users, or should we configure it on behalf of them? Note that when we go the former approach, some Gmail users simply can't afford GCP pricing for whatever reason (even don't have any of required payment methods), whereas the latter approach we must cover that cost (and Software Freedom Conservancy can raise funds needed for it or git.git developers can pay it).

Thanks.
[1]: https://developers.google.com/workspace/guides/create-project
-- 
An old man doll... just what I always wanted! - Clara
Next: ZheNing Hu
Message 1 of 31 in “Gmail OAuth2 in git send-email”
  1. Bagas SanjayaJun 3, 2021
  2. ZheNing HuJun 3, 2021
  3. Jonathan NiederJun 3, 2021
  4. Eric SunshineJun 3, 2021
  5. Ævar Arnfjörð BjarmasonJun 3, 2021
  6. Felipe ContrerasJun 3, 2021
  7. Andreas SchwabJun 3, 2021
  8. Felipe ContrerasJun 3, 2021
  9. Jonathan NiederJun 4, 2021
  10. Jonathan NiederJun 4, 2021
  11. Felipe ContrerasJun 4, 2021
  12. Konstantin RyabitsevJun 3, 2021
  13. Eric SunshineJun 3, 2021
  14. Konstantin RyabitsevJun 3, 2021
  15. Michal SuchánekJun 3, 2021
  16. Konstantin RyabitsevJun 3, 2021
  17. Michal SuchánekJun 3, 2021
  18. Eric SunshineJun 3, 2021
  19. Felipe ContrerasJun 3, 2021
  20. Eric SunshineJun 3, 2021
  21. Felipe ContrerasJun 4, 2021
  22. Đoàn Trần Công DanhJun 4, 2021
  23. Felipe ContrerasJun 4, 2021
  24. Đoàn Trần Công DanhJun 4, 2021
  25. Felipe ContrerasJun 4, 2021
  26. Đoàn Trần Công DanhJun 4, 2021
  27. Felipe ContrerasJun 4, 2021
  28. Đoàn Trần Công DanhJun 4, 2021
  29. Felipe ContrerasJun 4, 2021
  30. Eric SunshineJun 4, 2021
  31. Felipe ContrerasJun 4, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.