title: Warning: Identity file /home/user/.ssh/id_rsa not accessible: No such file or directory
body: <p>I'm using <a href="https://github.com/deployphp/deployer" rel="nofollow noreferrer">Deployer</a> for deploying my code to multiple servers. Today I got this error after starting a deployment:</p>
  
  <pre><code>[Deployer\Exception\RuntimeException (-1)]                                                        
  The command "if hash command 2&gt;/dev/null; then echo 'true'; fi" failed.                           
  Exit Code: -1 (Unknown error)                                                                     
  Host Name: staging                                                                                
  ================                                                                                  
  Warning: Identity file /home/user/.ssh/id_rsa not accessible: No such file or directory.  
  Permission denied (publickey).
  </code></pre>
  
  <p>First I thought it would probably has something to do with this server configuration since I moved the complete installation to another hosting provider. I tried to trigger a deployment to a server which I deployed to just fine in the past days but then got the same error. This quickly turned my suspicions from server to local. </p>
  
  <p>Since I'm running PHP in docker (Deployer is written in PHP), I thought it might had something to do with my ssh-agent not being forwarded correctly from my host OS to docker. I verified this by using a fresh PHP installation directly from my OS (Ubuntu if that would help). Same warning kept popping up in the logs. </p>
  
  <p>When logging in using the <code>ssh</code> command everything seems to be alright. I still have no clue what going on here. Any ideas?</p>
  
  <p>PS: I also created an issue at Deployer's GIT repo: <a href="https://github.com/deployphp/deployer/issues/1507" rel="nofollow noreferrer">https://github.com/deployphp/deployer/issues/1507</a></p>