Mercurial.hgrc notify error

Can anyone tell me what is wrong with my .hgrc config ? I am trying to use gmail to send email after every push and / or commit.

.hgrc

[paths]
default = ssh://www.domain.com/repo/hg

[ui]
username = intern <user@domain.com>
ssh="C:\Program Files (x86)\Mercurial\plink.exe" -ssh -i "C:\Program Files (x86)\Mercurial\key.pub"

[extensions]
hgext.notify = 

[hooks]
changegroup.notify = python:hgext.notify.hook
incoming.notify = python:hgext.notify.hook

[email]
from = user@domain.com

[smtp]
host = smtp.gmail.com
username = user@gmail.com
password = sure
port = 587
tls = true

[web]
baseurl = http://dev/...

[notify]
sources = serve push pull bundle
test = False
config = /path/to/subscription/file
template = \ndetails:   {baseurl}{webroot}/rev/{node|short}\nchangeset: {rev}:{node|short}\nuser:      {author}\ndate:      {date|date}\ndescription:\n{desc}\n
maxdiff = 300

      

Error

Incoming comand failed for P/project. running ""C:\Program Files (x86)\Mercurial\plink.exe" -ssh -i "C:\Program Files (x86)\Mercurial\key.pub" user@domain.com "hg -R repo/hg serve --stdio""
sending hello command
sending between command
remote: FATAL ERROR: Server unexpectedly closed network connection
abort: no suitable response from remote hg!
, error code: -1
  running ""C:\Program Files (x86)\Mercurial\plink.exe" -ssh -i "C:\Program Files (x86)\Mercurial\key.pub" user@domain.com "hg -R repo/hg serve --stdio""
sending hello command
sending between command
remote: FATAL ERROR: Server unexpectedly closed network connection
abort: no suitable response from remote hg!

      

+2


a source to share


3 answers


Have you followed the steps in "AccessingSshRepositoriesFromWindows" ?

If so, you can still try:



Plink.exe

also has an argument -batch

that tells plink to be non-interactive.
Any action that would normally require user interaction (like a new host key) will cause the plink to exit immediately, not a crash. When the operation ssh

fails, you can use an argument --debug

to figure out what went wrong.
...

+2


a source


I believe you should have the private key locally and the public key goes to the target machine. It is strange, however, that it will nevertheless unite.



+1


a source


The problem might be that you are not sending the email with the extension notification.

If you followed the instructions correctly, you may have a problem with a public key and a private key.

You need to edit the authorized_iblocks on your server inside your user's .ssh folder and place your public key in your file inside that file.

The private key of your key, which you will use on the client using the "Add" button (the "Add key" button).

I recommend using a different email service instead of gmail, perhaps if you send a lot of automated emails. gmail can blacklist your ip and block emails.

0


a source







All Articles