Open ruigoncalves opened 12 years ago
note: i got here searching on a diff issue with perl's Net::OpenSSH package but it has similar error to yours.
probably the apache2 user (www-data for ubuntu users) trying to use ssh to connect to another machine default location to store known_hosts for ssh is ~/.ssh/known_hosts so the home (~) directory of www-data is /var/www, that translates to /var/www/.ssh/known_hosts since www-data cannot write to /var/www, you get error.
i found that i can ignore the "Could not create directory '/var/www/.ssh'." if i just created a empty /var/www/.ssh file there just to hold that spot. -rw-r--r-- 1 root root 0 2013-02-07 16:11 .ssh
i tried creating the .ssh directory as the error suggested and gave it permissions for www-data to write in it and it didnt seem to try to write anything in there anyway so it's probably ok to ignore.
This worked for me as well.
Hi there!
After pushing an existing git repo into Redmine, the following error message is constantly logged in the apache error log file: _Failed to add the host to the list of known hosts (/var/www/.ssh/knownhosts). Could not create directory '/var/www/.ssh'.
Some information about my system configuration:
Does anyone know why this is happening? Thanks for the help, Regards!