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

9 messages from 2017-10-05 to 2017-11-17. Participants: Lars Schneider, Paolo Bonzini, ankostis, Kaartic Sivaraam, Christian Couder, Ævar Arnfjörð Bjarmason, Dennis Kaarsemaker.
Thread: https://gitlist.dev/t/46910

## Lars Schneider, 2017-10-05 10:52

Subject: git send-email does not work with Google anymore?!
Message-ID: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>
URL: https://gitlist.dev/e/EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A%40gmail.com

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

Thanks,
Lars
```

## Paolo Bonzini, 2017-10-05 13:43

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <384b95b9-822a-872a-999a-10b5e1e60076@gnu.org>
URL: https://gitlist.dev/e/384b95b9-822a-872a-999a-10b5e1e60076%40gnu.org
In-Reply-To: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>

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

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. :)

Paolo

```

## ankostis, 2017-10-05 14:21

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <CA+dhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BdhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w%40mail.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:
>
> 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

```

## Paolo Bonzini, 2017-10-05 15:47

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <a5dc6969-9f2b-6468-962d-414d9252fd54@gnu.org>
URL: https://gitlist.dev/e/a5dc6969-9f2b-6468-962d-414d9252fd54%40gnu.org
In-Reply-To: <CA+dhYEUb7uwpYazR1MXNYBXCTPipY0zVKDadnxOKMLaYiM932w@mail.gmail.com>

```
On 05/10/2017 16:21, ankostis wrote:
> 
> 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 says for me "This setting is not available for accounts with 2-Step
Verification enabled. Such accounts require an application-specific
password for less secure apps access", which is the right thing to do.

I used an app-specific password ten minutes before answering OP...

Paolo

```

## Kaartic Sivaraam, 2017-10-06 14:43

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <1507301029.12554.12.camel@gmail.com>
URL: https://gitlist.dev/e/1507301029.12554.12.camel%40gmail.com
In-Reply-To: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>

```
On Thu, 2017-10-05 at 12:52 +0200, Lars Schneider wrote:
> 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 thought I was the only one having this problem. Seems, I'm not alone
;-) Until recently I was using the email address,

kaarticsivaraam91196@gmail.com

to send patches. Last week, I got the same error message you did and
tried to fix it in various ways but failed in my attempt; got fed up
and switched to another mail address I owned (the current one) using
which I'm able to send patches (surprise !). Fortune for me as, it
wasn't a big deal. I think this is an issue with Google.

(I still don't know when I'm going to get the error for this one. I
don't have ideas to change this one.)


-- 
Kaartic

```

## Christian Couder, 2017-10-06 15:02

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <CAP8UFD1hTc0dXWmiF6aW6=_7DhB8zhvzOXy9hEXrfvgWwimJ7g@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD1hTc0dXWmiF6aW6%3D_7DhB8zhvzOXy9hEXrfvgWwimJ7g%40mail.gmail.com
In-Reply-To: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>

```
Hi,

On Thu, Oct 5, 2017 at 12:52 PM, Lars Schneider
<larsxschneider@gmail.com> wrote:

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

As I wrote at the top of:

https://public-inbox.org/git/CAP8UFD2j-UFh+9awz91gtZ-jusq7EUOExMgURO59vpf29jXS4A@mail.gmail.com/

I also got the same problem.

```

## Ævar Arnfjörð Bjarmason, 2017-10-06 16:13

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <878tgo6ypk.fsf@evledraar.booking.com>
URL: https://gitlist.dev/e/878tgo6ypk.fsf%40evledraar.booking.com
In-Reply-To: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>

```

On Thu, Oct 05 2017, Lars Schneider jotted:

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

It still works for me. Just sent myself an E-Mail now via
git-send-email.

    Password for 'smtp://avarab@gmail.com@smtp.gmail.com:465':
    OK. Log says:
    Server: smtp.gmail.com
    [...]
    Result: 250

My settings are:

    [sendemail]
            smtpserver = smtp.gmail.com
            smtpEncryption = ssl
            smtpuser = avarab@gmail.com
            confirm = always

And my https://myaccount.google.com/apppasswords lists an app
password.

If you see this E-Mail from me that means my local Exim instance (which
also has an app password) is able to send E-Mail as well.

I have 2fa turned on on my Google account, I just have these app
passwords for GMail.

```

## Dennis Kaarsemaker, 2017-10-23 16:27

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <1508776071.2750.15.camel@kaarsemaker.net>
URL: https://gitlist.dev/e/1508776071.2750.15.camel%40kaarsemaker.net
In-Reply-To: <EC14D46D-61AB-4531-AE20-8C2B3F6B5A2A@gmail.com>

```
On Thu, 2017-10-05 at 12:52 +0200, Lars Schneider wrote:
> Hi,
> 
> I used to use the Google SMTP server to send my patches to the list with 
> the following config:

>8 ---

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

For 2fa-protected accounts, this seems to break quite often. I ended up
setting up a mail relay on my vps for this. If you want, you can use
git.seveas.net to send patches to the git mailing lists (doesn't work
for other recipients, I'm not quite stupid enough to run an open mail
relay...)

D.

```

## Lars Schneider, 2017-11-17 13:50

Subject: Re: git send-email does not work with Google anymore?!
Message-ID: <9FF8A4F0-C449-48C7-8C90-290BF86906C9@gmail.com>
URL: https://gitlist.dev/e/9FF8A4F0-C449-48C7-8C90-290BF86906C9%40gmail.com
In-Reply-To: <1508776071.2750.15.camel@kaarsemaker.net>

```

> On 23 Oct 2017, at 18:27, Dennis Kaarsemaker <dennis@kaarsemaker.net> wrote:
> 
> On Thu, 2017-10-05 at 12:52 +0200, Lars Schneider wrote:
>> Hi,
>> 
>> I used to use the Google SMTP server to send my patches to the list with 
>> the following config:
> 
>> 8 ---
> 
>> 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?
> 
> For 2fa-protected accounts, this seems to break quite often. I ended up
> setting up a mail relay on my vps for this. If you want, you can use
> git.seveas.net to send patches to the git mailing lists (doesn't work
> for other recipients, I'm not quite stupid enough to run an open mail
> relay...)

:-) ... unfortunately that also means one can not CC people using your
server. Looks like I need to setup my own solution after all :-(

Cheers,
Lars
```
