git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git send-email does not work with Google anymore?!
@ 2017-10-05 10:52 Lars Schneider
  2017-10-05 13:43 ` Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Lars Schneider @ 2017-10-05 10:52 UTC (permalink / raw)
  To: Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  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
  2017-10-06 14:43 ` Kaartic Sivaraam
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2017-10-05 13:43 UTC (permalink / raw)
  To: Lars Schneider, Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  2017-10-05 13:43 ` Paolo Bonzini
@ 2017-10-05 14:21   ` ankostis
  2017-10-05 15:47     ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: ankostis @ 2017-10-05 14:21 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Lars Schneider, Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  2017-10-05 14:21   ` ankostis
@ 2017-10-05 15:47     ` Paolo Bonzini
  0 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2017-10-05 15:47 UTC (permalink / raw)
  To: ankostis; +Cc: Lars Schneider, Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  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-06 14:43 ` Kaartic Sivaraam
  2017-10-06 15:02 ` Christian Couder
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Kaartic Sivaraam @ 2017-10-06 14:43 UTC (permalink / raw)
  To: Lars Schneider, Git Users

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  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-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
  4 siblings, 0 replies; 9+ messages in thread
From: Christian Couder @ 2017-10-06 15:02 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Git Users

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  2017-10-05 10:52 git send-email does not work with Google anymore?! Lars Schneider
                   ` (2 preceding siblings ...)
  2017-10-06 15:02 ` Christian Couder
@ 2017-10-06 16:13 ` Ævar Arnfjörð Bjarmason
  2017-10-23 16:27 ` Dennis Kaarsemaker
  4 siblings, 0 replies; 9+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-10-06 16:13 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Git Users


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  2017-10-05 10:52 git send-email does not work with Google anymore?! Lars Schneider
                   ` (3 preceding siblings ...)
  2017-10-06 16:13 ` Ævar Arnfjörð Bjarmason
@ 2017-10-23 16:27 ` Dennis Kaarsemaker
  2017-11-17 13:50   ` Lars Schneider
  4 siblings, 1 reply; 9+ messages in thread
From: Dennis Kaarsemaker @ 2017-10-23 16:27 UTC (permalink / raw)
  To: Lars Schneider, Git Users

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git send-email does not work with Google anymore?!
  2017-10-23 16:27 ` Dennis Kaarsemaker
@ 2017-11-17 13:50   ` Lars Schneider
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Schneider @ 2017-11-17 13:50 UTC (permalink / raw)
  To: Dennis Kaarsemaker; +Cc: Git Users


> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-17 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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