git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: ankostis <ankostis@gmail.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Lars Schneider <larsxschneider@gmail.com>,
	Git Users <git@vger.kernel.org>
Subject: Re: git send-email does not work with Google anymore?!
Date: Thu, 5 Oct 2017 16:21:20 +0200	[thread overview]
Message-ID: <CA+dhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w@mail.gmail.com> (raw)
In-Reply-To: <384b95b9-822a-872a-999a-10b5e1e60076@gnu.org>

On 5 October 2017 at 15:43, Paolo Bonzini <bonzini@gnu.org> wrote:
>
> 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 :-(



>
> 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

  reply	other threads:[~2017-10-05 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 10:52 git send-email does not work with Google anymore?! Lars Schneider
2017-10-05 13:43 ` Paolo Bonzini
2017-10-05 14:21   ` ankostis [this message]
2017-10-05 15:47     ` Paolo Bonzini
2017-10-06 14:43 ` Kaartic Sivaraam
2017-10-06 15:02 ` Christian Couder
2017-10-06 16:13 ` Ævar Arnfjörð Bjarmason
2017-10-23 16:27 ` Dennis Kaarsemaker
2017-11-17 13:50   ` Lars Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+dhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w@mail.gmail.com \
    --to=ankostis@gmail.com \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).