All of lore.kernel.org
 help / color / mirror / Atom feed
* Git send-email blocked by gmail security changes  (and how to fix it)
@ 2022-09-22  3:20 Benjamin Esquivel
  2022-09-22  6:07 ` [yocto] " Nicolas Dechesne
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Esquivel @ 2022-09-22  3:20 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

TL;DR Google App passwords are a workaround if your google password is not working in git send-email. 

Hi,

Not sure if this is the right list but I thought of sending it here as a starter. I was following Stephen Jolley’s email for the Project status where it has a section for ‘ways to contribute’ and a pointer to the newcomers wiki. There is a link on How to Submit a Patch[1]  which has an example on how to add a gmail account there. I followed it but in the end I was blocked by an error stating that my 'Username and Password not accepted’. Googled a proposed fix[2] to go to the gmail security settings and enable "Access for less secure apps” but the solution is outdated as my settings had a notice saying that it was removed some time ago.

But I found that you can use another security feature from google called app passwords[3]. And that means that it will give you one specific password for your app needs. I tested this in the git send-email line and it worked. I don’t know if others are doing this or if their previous settings remain ok if these were configured before the recent security resets that google has done.

Is anyone struggling with this?
Should we update the wiki to include this tip?

Regards,

Benjamin

[1] https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded <https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded>
[2] https://support.google.com/mail/thread/5621336?hl=en <https://support.google.com/mail/thread/5621336?hl=en>
[3] https://support.google.com/accounts/answer/185833 <https://support.google.com/accounts/answer/185833>

[-- Attachment #2: Type: text/html, Size: 3306 bytes --]

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

* Re: [yocto] Git send-email blocked by gmail security changes (and how to fix it)
  2022-09-22  3:20 Git send-email blocked by gmail security changes (and how to fix it) Benjamin Esquivel
@ 2022-09-22  6:07 ` Nicolas Dechesne
  2022-09-22 16:51   ` Benjamin Esquivel
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dechesne @ 2022-09-22  6:07 UTC (permalink / raw)
  To: Benjamin Esquivel; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]

On Thu, Sep 22, 2022 at 5:20 AM Benjamin Esquivel <
benjamin.esquivel@gmail.com> wrote:

> TL;DR Google App passwords are a workaround if your google password is not
> working in git send-email.
>
> Hi,
>
> Not sure if this is the right list but I thought of sending it here as a
> starter. I was following Stephen Jolley’s email for the Project status
> where it has a section for ‘ways to contribute’ and a pointer to the
> newcomers wiki. There is a link on How to Submit a Patch[1]  which has an
> example on how to add a gmail account there. I followed it but in the end I
> was blocked by an error stating that my 'Username and Password not
> accepted’. Googled a proposed fix[2] to go to the gmail security settings
> and enable "Access for less secure apps” but the solution is outdated as my
> settings had a notice saying that it was removed some time ago.
>
> But I found that you can use another security feature from google called
> app passwords[3]. And that means that it will give you one specific
> password for your app needs. I tested this in the git send-email line and
> it worked. I don’t know if others are doing this or if their previous
> settings remain ok if these were configured before the recent security
> resets that google has done.
>

You did the right thing. This is also how I use gmail with git-send-email.


>
> Is anyone struggling with this?
>

I don't remember if they disabled it for all gmail users, or only for users
who enable 2FA.. but using apps specific token is what we should recommend
to everyone.


> Should we update the wiki to include this tip?
>

Yes, definitely. If you want to do it, please go ahead.  If you need help
with that, let me know.


> Regards,
>
> Benjamin
>
> [1]
> https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
> [2] https://support.google.com/mail/thread/5621336?hl=en
> [3] https://support.google.com/accounts/answer/185833
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#58128):
> https://lists.yoctoproject.org/g/yocto/message/58128
> Mute This Topic: https://lists.yoctoproject.org/mt/93841825/1279857
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> nicolas.dechesne@linaro.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 4666 bytes --]

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

* Re: [yocto] Git send-email blocked by gmail security changes (and how to fix it)
  2022-09-22  6:07 ` [yocto] " Nicolas Dechesne
@ 2022-09-22 16:51   ` Benjamin Esquivel
  2022-09-27 14:16     ` Martin Jansa
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Esquivel @ 2022-09-22 16:51 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3023 bytes --]



> On Sep 21, 2022, at 11:07 PM, Nicolas Dechesne <nicolas.dechesne@linaro.org> wrote:
> 
> 
> 
> On Thu, Sep 22, 2022 at 5:20 AM Benjamin Esquivel <benjamin.esquivel@gmail.com <mailto:benjamin.esquivel@gmail.com>> wrote:
> TL;DR Google App passwords are a workaround if your google password is not working in git send-email. 
> 
> Hi,
> 
> Not sure if this is the right list but I thought of sending it here as a starter. I was following Stephen Jolley’s email for the Project status where it has a section for ‘ways to contribute’ and a pointer to the newcomers wiki. There is a link on How to Submit a Patch[1]  which has an example on how to add a gmail account there. I followed it but in the end I was blocked by an error stating that my 'Username and Password not accepted’. Googled a proposed fix[2] to go to the gmail security settings and enable "Access for less secure apps” but the solution is outdated as my settings had a notice saying that it was removed some time ago.
> 
> But I found that you can use another security feature from google called app passwords[3]. And that means that it will give you one specific password for your app needs. I tested this in the git send-email line and it worked. I don’t know if others are doing this or if their previous settings remain ok if these were configured before the recent security resets that google has done.
> 
> You did the right thing. This is also how I use gmail with git-send-email. 
>  
> 
> Is anyone struggling with this?
> 
> I don't remember if they disabled it for all gmail users, or only for users who enable 2FA.. but using apps specific token is what we should recommend to everyone. 
>  
> Should we update the wiki to include this tip?
> 
> Yes, definitely. If you want to do it, please go ahead.  If you need help with that, let me know. 
I have just requested an account to the wiki and I’ll update that section once I get it :)
> 
> 
> Regards,
> 
> Benjamin
> 
> [1] https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded <https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded>
> [2] https://support.google.com/mail/thread/5621336?hl=en <https://support.google.com/mail/thread/5621336?hl=en>
> [3] https://support.google.com/accounts/answer/185833 <https://support.google.com/accounts/answer/185833>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#58128): https://lists.yoctoproject.org/g/yocto/message/58128 <https://lists.yoctoproject.org/g/yocto/message/58128>
> Mute This Topic: https://lists.yoctoproject.org/mt/93841825/1279857 <https://lists.yoctoproject.org/mt/93841825/1279857>
> Group Owner: yocto+owner@lists.yoctoproject.org <mailto:yocto%2Bowner@lists.yoctoproject.org>
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub <https://lists.yoctoproject.org/g/yocto/unsub> [nicolas.dechesne@linaro.org <mailto:nicolas.dechesne@linaro.org>]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


[-- Attachment #2: Type: text/html, Size: 5779 bytes --]

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

* Re: [yocto] Git send-email blocked by gmail security changes (and how to fix it)
  2022-09-22 16:51   ` Benjamin Esquivel
@ 2022-09-27 14:16     ` Martin Jansa
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2022-09-27 14:16 UTC (permalink / raw)
  To: Benjamin Esquivel, robert_henz; +Cc: Nicolas Dechesne, yocto

[-- Attachment #1: Type: text/plain, Size: 3308 bytes --]

On Thu, Sep 22, 2022 at 6:51 PM Benjamin Esquivel <
benjamin.esquivel@gmail.com> wrote:

>
>
> On Sep 21, 2022, at 11:07 PM, Nicolas Dechesne <
> nicolas.dechesne@linaro.org> wrote:
>
>
>
> On Thu, Sep 22, 2022 at 5:20 AM Benjamin Esquivel <
> benjamin.esquivel@gmail.com> wrote:
>
>> TL;DR Google App passwords are a workaround if your google password is
>> not working in git send-email.
>>
>> Hi,
>>
>> Not sure if this is the right list but I thought of sending it here as a
>> starter. I was following Stephen Jolley’s email for the Project status
>> where it has a section for ‘ways to contribute’ and a pointer to the
>> newcomers wiki. There is a link on How to Submit a Patch[1]  which has an
>> example on how to add a gmail account there. I followed it but in the end I
>> was blocked by an error stating that my 'Username and Password not
>> accepted’. Googled a proposed fix[2] to go to the gmail security settings
>> and enable "Access for less secure apps” but the solution is outdated as my
>> settings had a notice saying that it was removed some time ago.
>>
>> But I found that you can use another security feature from google called
>> app passwords[3]. And that means that it will give you one specific
>> password for your app needs. I tested this in the git send-email line and
>> it worked. I don’t know if others are doing this or if their previous
>> settings remain ok if these were configured before the recent security
>> resets that google has done.
>>
>
> You did the right thing. This is also how I use gmail with git-send-email.
>
>
>>
>> Is anyone struggling with this?
>>
>
> I don't remember if they disabled it for all gmail users, or only for
> users who enable 2FA.. but using apps specific token is what we should
> recommend to everyone.
>
>
>> Should we update the wiki to include this tip?
>>
>
> Yes, definitely. If you want to do it, please go ahead.  If you need help
> with that, let me know.
>
> I have just requested an account to the wiki and I’ll update that section
> once I get it :)
>

There was another thread about sending e-mails with git send-email this
week:
https://lists.openembedded.org/g/openembedded-core/message/171101
+Robert
which pointed to this longer explanation:
https://stackoverflow.com/questions/68238912/how-to-configure-and-use-git-send-email-to-work-with-gmail-to-email-patches-to

FWIW: I'm happily using msmtp with gmail account which is then used by git
send-email (through sendmail) with additional benefit that you can use the
same from mutt, cron, command line or whatever else you might want to send
e-mail (instead of using something specific to git send-email).

All you need to do is to install msmtp and short ~/.msmtprc like:
account default
auth login
from foo.bar@gmail.com
host smtp.gmail.com
user foo.bar@gmail.com
password foo.bar's.app.password

tls
tls_certcheck off
tls_starttls on

Then
git config sendemail.to <corresponding.ML>
e.g. openembedded-core@lists.openembedded.org in repos, so that you don't
need to manually type To: every time.

So yes, please update the wiki, but it's not as complicated as it might
seem (based on the questions about this topic), nor is it specific to
OE/Yocto.

Cheers,

[-- Attachment #2: Type: text/html, Size: 5236 bytes --]

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

end of thread, other threads:[~2022-09-27 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  3:20 Git send-email blocked by gmail security changes (and how to fix it) Benjamin Esquivel
2022-09-22  6:07 ` [yocto] " Nicolas Dechesne
2022-09-22 16:51   ` Benjamin Esquivel
2022-09-27 14:16     ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.