1

I am getting following error when i git clone using php shell_exec() on windows server. My git version is git version 2.11.1.windows.1.

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists

But working fine through git bash and command prompt. I have configure ssh properly.

The problem is the file which i have created is in the c:/inetpub/example.com/deploy.php

I am running following code in php file.

shell_exec('cd c:/inetpub/ &&  "c:/Program Files/Git/bin/git" clone sshURL  2>&1')

Can any one suggest any solution to fix this issue.

Abdul Rauf
  • 763
  • 2
  • 8
  • 28

0 Answers0