有人可以告诉我我的.hgrc配置不正确吗?我试图在每次推送和/或提交后使用gmail发送电子邮件。
.hgrc
[paths]
default = ssh://www.domain.com/repo/hg
[ui]
username = intern <[email protected]>
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 = [email protected]
[smtp]
host = smtp.gmail.com
username = [email protected]
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
错误
Incoming comand failed for P/project. running ""C:\Program Files (x86)\Mercurial\plink.exe" -ssh -i "C:\Program Files (x86)\Mercurial\key.pub" [email protected] "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" [email protected] "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!
最佳答案
您是否遵循"AccessingSshRepositoriesFromWindows"中详细说明的步骤?
如果是,您仍然可以尝试:
Plink.exe
还有一个-batch
参数,该参数告诉plink非交互式运行。
通常需要用户交互的任何活动(例如,新的主机密钥)都将导致plink立即退出而不是停顿。
当ssh
操作失败时,可以使用--debug
参数找出问题所在。