Search code examples
sshphp-deployer

Error "getsockname failed: Not a socket" on Windows 10


I am successfully connecting to the server via cmd , but I get error after send command of deploy

error getsockname failed: Not a socket

Running command in cmd from project directory call vendor/bin/dep deploy st1

Deployer version: 6.8.0 PHP version: 7.3 my OS: Windows 10 x64

✈︎ Deploying master on st1.XXXX.ru

➤ Executing task deploy:prepare

✔ Executing task deploy:failed

➤ Executing task deploy:unlock

In Client.php line 103:

  The command "rm -f /home/admin/web/st1.XXXX.ru/.dep/deploy.lock" failed.  

  Exit Code: -1 (Unknown error)

  Host Name: st1.XXXX.ru

  ================
  getsockname failed: Not a socket
  packet_write_poll: Connection to UNKNOWN port -1: Permission denied        

Solution

  • Three solutions:

    • Disable set ('ssh_multiplexing', false); in the file deployer.php or
    • in options use the dep deploy -o ssh_multiplexing=false or
    • deploy through your git bash

    And be sure to disable set('git_tty', false); (It's not support in Windows)

    ** Use option -vvv with deploy command to see more information about deploying.