2010-05-04 3 views
2

.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! 

답변

2

당신이 "AccessingSshRepositoriesFromWindows"에서 자세한 조 단계를 따르나요 .hgrc

?

그렇다면, 당신은 여전히 ​​시도 할 수 있습니다 :

Plink.exe는 비 대화 형으로 실행하기 위해 가용 스루풋 알려주는 -batch 인수가 있습니다.
일반적으로 사용자 상호 작용이 필요한 활동 (예 : 새로운 호스트 키)은 plink가 실속하기보다는 즉시 종료되도록합니다.
ssh 작업이 실패하면 --debug 인수를 사용하여 잘못된 내용을 파악할 수 있습니다..

+0

나는 위의 단계를 단계적으로 피곤했다 ... 같은 결과. "서버가 예기치 않게 네트워크 연결을 닫았습니다." – Eeyore

1

개인 키가 로컬에 있어야하며 공개 키가 대상 컴퓨터에 있어야한다고 생각합니다. 그것은 전혀 이상하게 보입니다.

0

문제는 알림 확장을 사용하여 이메일을 보내지 않고 푸시 할 수 있습니다.

지침을 올바르게 따라했다면 공개 키와 개인 키가 문제가 될 수 있습니다.

사용자의 서버에서 authorized_keys를 편집하고 사용자의 공개 키를이 파일에 저장해야합니다.

미성년자 (Add Key) 버튼을 사용하여 클라이언트에서 사용할 키의 개인 키.

자동 이메일을 많이 보내는 경우 gmail 대신 다른 이메일 서비스를 사용하는 것이 좋습니다. Gmail은 귀하의 IP를 차단 목록에 넣고 이메일을 차단할 수 있습니다.