mgaitan / waliki

A wiki engine powered by Django and Git
http://waliki.pythonanywhere.com
BSD 3-Clause "New" or "Revised" License
309 stars 56 forks source link

Pull webhook stucked, waiting for input (due to known hosts) #101

Open fpytloun opened 9 years ago

fpytloun commented 9 years ago

If I call webhook via curl -X POST http://waliki.ifrit.eu/wiki/_hooks/pull/origin it get's stucked and will timeout.

If run manually as given user, I get following:

%{%}$%{%} /usr/bin/git --no-pager pull -s recursive -X ours origin HEAD
The authenticity of host 'git.ifrit.eu (2a01:430:17:1::ffff:177)' can't be established.
RSA key fingerprint is ea:93:0b:d2:8f:2d:58:c6:e4:61:cf:cf:34:49:05:5d.
Are you sure you want to continue connecting (yes/no)?

IMHO working with git should be done some better way than calling subprocess or this issue should be solved by -o StrictHostKeyChecking=no or calling ssh-keyscan and adding remote host before pulling. Or at least mention this in docs (I am going to write a blog post about seting up and using Waliki soon).

mgaitan commented 9 years ago

Hello Filip, thank you very much for your interest in Waliki!

I agree with you about the limitations of the way we are using git, specially in the impact on performance and the "bootleneck" for concurrency it means. undoubtedly, this should be migrated to libgit2 in the future.

for this problem in particular, I'd be glad with a pull request. Both ways you propose are ok (your choice) but if it the former, take care to be compatible with the wider range of git versions possible.

cheers!