Git-email cannot send email

As is known, git-send-email is easy to send patches to upstreams. However, now, I happen to following questions. How to solve it???

$ sudo git send-email --from=lgb.nwpu@gmail.com --to=ganeti-devel@googlegroups.com --in-reply-to=lgb.nwpu@gmail.com --subject="[PATCH stable-2.10] Fix typos in doc/design-file-based-storage.rst" --smtp-server=/usr/bin/msmtp ./0001-fix-typos-in-design-file-based-storage.rst-doc.patch
./0001-fix-typos-in-design-file-based-storage.rst-doc.patch
(mbox) Adding cc: Gangbiao Liu lgb.nwpu@gmail.com from line 'From: Gangbiao Liu lgb.nwpu@gmail.com'

From: lgb.nwpu@gmail.com
To: ganeti-devel@googlegroups.com
Cc: Gangbiao Liu lgb.nwpu@gmail.com
Subject: [PATCH] fix typos in design-file-based-storage.rst doc
Date: Wed, 8 Apr 2015 08:32:29 +0800
Message-Id: 1428453149-14771-1-git-send-email-lgb.nwpu@gmail.com
X-Mailer: git-send-email 1.7.9.5
In-Reply-To: lgb.nwpu@gmail.com
References: lgb.nwpu@gmail.com

Send this email? ([y]es|[n]o|[q]uit|[a]ll): y
msmtp: authentication failed (method LOGIN)
msmtp: server message: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbv3O
msmtp: server message: 534-5.7.14 cPai8EIcl48wNihVcKkTziP4YxuHJfgZxsu5XYvH1mb0QmWQFRLi0OJiV9-9j8Z5ZkYvTX
msmtp: server message: 534-5.7.14 R65etrIdC8wXoITMaj9Wj3AwyoSl1NBL-zoZ_PwwWc6R6pqdsdWbxPm5fm-YGNsklou2IR
msmtp: server message: 534-5.7.14 ppsiq3kpv6Hz0ANJ3yA3l7mQfCagKhxYfILEs9AfgOpEQuLqTOze5QIcqcBMRHnHdJQQIp
msmtp: server message: 534-5.7.14 _d-r9pA> Please log in via your web browser and then try again.
msmtp: server message: 534-5.7.14 Learn more at
msmtp: server message: 534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 pi2sm9298789pdb.47 - gsmtp
msmtp: could not send mail (account default from /home/harry/.msmtprc)
Died at /usr/lib/git-core/git-send-email line 1069, line 1.
harry@harry-vera:~/workshop2/ganeti/doc$ sudo git send-email --from=lgb.nwpu@gmail.com --to=ganeti-devel@googlegroups.com --in-reply-to=lgb.nwpu@gmail.com --subject="[PATCH stable-2.10] Fix typos in doc/design-file-based-storage.rst" --smtp-server=/usr/bin/msmtp ./0001-fix-typos-in-design-file-based-storage.rst-doc.patch
./0001-fix-typos-in-design-file-based-storage.rst-doc.patch
(mbox) Adding cc: Gangbiao Liu lgb.nwpu@gmail.com from line 'From: Gangbiao Liu lgb.nwpu@gmail.com'

From: lgb.nwpu@gmail.com
To: ganeti-devel@googlegroups.com
Cc: Gangbiao Liu lgb.nwpu@gmail.com
Subject: [PATCH] fix typos in design-file-based-storage.rst doc
Date: Wed, 8 Apr 2015 08:35:08 +0800
Message-Id: 1428453308-15735-1-git-send-email-lgb.nwpu@gmail.com
X-Mailer: git-send-email 1.7.9.5
In-Reply-To: lgb.nwpu@gmail.com
References: lgb.nwpu@gmail.com

Send this email? ([y]es|[n]o|[q]uit|[a]ll): y
msmtp: authentication failed (method LOGIN)
msmtp: server message: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvhy
msmtp: server message: 534-5.7.14 Q9hgoVw_cQG3gBzel7BBO-C0DTJ1IVY9qixONd_MYJwFhv8eYRUMq2uOEIph15VZVeD4H5
msmtp: server message: 534-5.7.14 9dMTRJGpdFprU8TEIREAZyGnaWfej6gF7Yn2OYij4q8zJvQ7qWmlaaj4ofj8BLHjST3hq4
msmtp: server message: 534-5.7.14 pWvyjaB1oeew1pGxdWFsVFBcbcLyvBXbesK93xw7vjadGK1AZeGJ-gKIJH7nXhPCrXuryT
msmtp: server message: 534-5.7.14 VisIzruH3IuTouluqS23h-tpr95k> Please log in via your web browser and
msmtp: server message: 534-5.7.14 then try again.
msmtp: server message: 534-5.7.14 Learn more at
msmtp: server message: 534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 xm7sm9446552pac.28 - gsmtp
msmtp: could not send mail (account default from /home/harry/.msmtprc)
Died at /usr/lib/git-core/git-send-email line 1069, line 1.

asked Apr 7, 2015 by harryxiyou (5,830 points)

1 Answer

 
Best answer

1,Add a app password as described in https://support.google.com/accounts/answer/185833
2, Write this password to your msmtp config file instead of your account password

NOTE:
1, In 1 step, you need to choose other app and write 'git-email' (use whatever you like) as app name
2, In 2 step, the new password is generated by Google like this 'abcd efgh dddd gggg'

Engjoy yourself ;-)

answered Apr 7, 2015 by harryxiyou (5,830 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...