On my Fedora workstation, the /etc/ssh/ssh_known_hosts is readable by root only.
Don't ask me why. It is a fact and git push or git fetch in this context works great either.
So, I expect that go-git with push/fetch and ssh transport should behave the same.
Hi,
Thank you for this project! It is really great!
On my Fedora workstation, the
/etc/ssh/ssh_known_hosts
is readable by root only. Don't ask me why. It is a fact andgit push
orgit fetch
in this context works great either.So, I expect that go-git with push/fetch and ssh transport should behave the same.
So, I believe we should update https://github.com/src-d/go-git/blob/master/plumbing/transport/ssh/auth_method.go#L279 to test on readable rights as well. Currently,
filterKnownHostsFiles
check on files existence only. I think we should add a check that the file is also readable.Any thoughts?
I can create a PR for that.
Thanks