problem in setting up notify (bitbucket), smtp server
Uwe Brauer
oub at mat.ucm.es
Tue May 23 16:06:19 UTC 2017
Hi
I know that bitbucket has its own notify system, but just in case I
wanted to set up my own.
So have the following entries in my .hgrc file
[extensions]
notify=
[hooks]
changegroup.notify = python:hgext.notify.hook
incoming.notify = python:hgext.notify.hook
outgoing.notify = python:hgext.notify.hook
[email]
from = Uwe Brauer <oub at mat.ucm.es>
[email]
method = smtp
[smtp]
# I don't trust my localhost smtp server so I chose google
#host = localhost
host = smtp.gmail.com
# Optional options:
username = oub at ucm.es
port = 587
# tls = true # Alternative values: smtps, starttls (equivalent of true)
tls = starttls
[web]
# my bitbucket repo.
baseurl = https://bitbucket.org/kalthad/hgquim-num-estad/
[notify]
sources = serve push unbundle commit
# set this to False when you're ready for mail to start sending
test = True
config = /home/oub/ALLES/init_files/notifyconf
# You can override the changeset template here, if you want.
# If it doesn't start with \n it may confuse the email parser.
# here's an example that makes the changeset template look more like hg log:
template =
details: {baseurl}/{webroot}/rev/{node|short}
branches: {branches}
changeset: {rev}:{node|short}
user: {author}
date: {date|date}
description:
{desc}\n
# max lines of diffs to include (0=none, -1=all)
maxdiff = 300
My notifyconf file contains
[usersubs]
# key is subscriber email, value is comma-separated list of glob patterns
user at host = *
[reposubs]
# key is glob pattern, value is comma-separated list of subscriber emails
* = oub at mat.ucm.es
I also tried.
[usersubs]
# key is subscriber email, value is comma-separated list of glob patterns
#user at host = *
With test = True
I see stuff like
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date: Tue, 23 May 2017 15:59:49 +0000
Subject: /home/oub/ALLES/Glatze-Rel/hgbitbucketdoc: Start to add notify s...
From: Uwe Brauer <oub at mat.ucm.es>
X-Hg-Notification: changeset b63edf71101c
Message-Id: <hg.b63edf71101c.1495555189.-235245741 at Gilgamesch>
To: oub at mat.ucm.es
......
So this looks good and I set
test to False
I receive
warning: connecting to smtp.gmail.com using legacy security technology
(TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more
info
password:
error: outgoing.notify hook failed: (535, '5.7.8 Username and Password
not accepted. Learn more at\n5.7.8
https://support.google.com/mail/?p=BadCredentials n49sm1731615wrn.30 -
gsmtp')
That is absurd I am sure it is my password, and username and the
setting I have tested in thunderbird
When I use
host = localhost
No message is sent.
What do I miss and how can I debug this, a part from setting test to
true, which is not helpful for the smtp sending stuff.
Thanks
Uwe Brauer
More information about the Mercurial
mailing list