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

Re: git send-email does not work with Google anymore?!

From
ankostis <ankostis@gmail.com>
Date
Oct 5, 2017, 14:21 UTC
Message-ID
<CA+dhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w@mail.gmail.com>
In-Reply-To
<384b95b9-822a-872a-999a-10b5e1e60076@gnu.org>
On 5 October 2017 at 15:43, Paolo Bonzini <bonzini@gnu.org> wrote:
Show 28 quoted lines
>
> On 05/10/2017 12:52, Lars Schneider wrote:
> > Hi,
> >
> > I used to use the Google SMTP server to send my patches to the list with
> > the following config:
> >
> >     [sendemail]
> >         smtpencryption = tls
> >         smtpserver = smtp.gmail.com
> >         smtpuser = larsxschneider@gmail.com
> >         smtpserverport = 587
> >         from = larsxschneider@gmail.com
> >         chainreplyto = false
> >         suppresscc = self
> >
> > Apparently that stopped working today. I get this error:
> >
> >     (mbox) Adding cc: Lars Schneider <larsxschneider@gmail.com> from line 'From: Lars Schneider <larsxschneider@gmail.com>'
> >     Password for 'smtp://larsxschneider@gmail.com@smtp.gmail.com:587':
> >     5.7.14 <https://accounts.google.com/signin/continue?...token...
> >     5.7.14 ...> Please log in via your web browser and
> >     5.7.14 then try again.
> >     5.7.14  Learn more at
> >     5.7.14  https://support.google.com/mail/answer/78754 ... - gsmtp
> >
> > Of couse I tried to log in via web browser etc. Does anyone else use
> > Google as SMTP server? If yes, does it work for you?

I have been using SMTP+GMail rather a lot, recently. The situation is a mess, and it becomes worse by the month!

Till recently, you had to perform various steps to achieve this:
1. Got to your web-gmail, Settings | Forwarding and POP/IMAP | Enable
IMAP Access
2. Enable access for "Less secure apps":
   https://support.google.com/accounts/answer/6010255?hl=en
3. Try to SMTP-login.
   BUT if the IP had not access web-GMail recently,
   you got the message you report.
   So you had to:
   - reconstruct the URL+token intermingled in the SMTP-error message,
   - paste it in your browser, and
   - do a web-login to prove you are a human.
You had to perform step 3 regularly.

Now, if you had 2-factor-auth enabled, you could use "app-passwords" to log into your gmail account: https://support.google.com/accounts/answer/185833?hl=en

But this seems to have stopped working; I clicked the link in the page below
  https://support.google.com/accounts/answer/6010255?hl=en
and for my account it tells me "less secure apps" access is unavailable :-(
Show 16 quoted lines
>
> It's probably a good idea to set up two-factor authentication and add an
> app-specific password for "git send-email" (at least that's what I do).
>
> The password can be stored encrypted using the OS keychain, or if you
> don't want/have one (e.g. you are running headless) you could check if
> your distro installs git-credential-netrc.  Create a ~/.netrc.gpg file,
> where the decrypted content should look like
>
>     machine smtp.gmail.com login larsxschneider@gmail.com password mypassword
>
> Then do
>
>     git config --global credential.helper netrc
>
> and you're all set. :)
I believe the best way forward is to use OAuth.
Ciao,
  Kostis
Previous: Paolo BonziniNext: Paolo Bonzini
Message 3 of 9 in “git send-email does not work with Google anymore?!”
  1. Lars SchneiderOct 5, 2017
  2. Paolo BonziniOct 5, 2017
  3. ankostisOct 5, 2017
  4. Paolo BonziniOct 5, 2017
  5. Kaartic SivaraamOct 6, 2017
  6. Christian CouderOct 6, 2017
  7. Ævar Arnfjörð BjarmasonOct 6, 2017
  8. Dennis KaarsemakerOct 23, 2017
  9. Lars SchneiderNov 17, 2017

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.