I have the script PHP follow:
shell_exec('D: && cd D:\Xampp\htdocs\demo_gitlab && git pull');
(Update gitlab with PHP) When i test with the command window, then result:
C:\Users\nknha>D: && cd D:\Xampp\htdocs\demo_gitlab && git pull
Enter passphrase for key '/c/Users/nknha/.ssh/hsdichvu':
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 1 (delta 0)
Unpacking objects: 100% (3/3), done.
From gitlab.com:huesoft/diet-tru-sau
7e940be..22886d0 master -> origin/master Updating 7e940be..22886d0
Fast-forward
README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
So how can enter the passphrase when running command shell_exec