1
我有腳本PHP如下:PHP:了shell_exec git的拉通密碼
shell_exec('D: && cd D:\Xampp\htdocs\demo_gitlab && git pull');
(與PHP更新gitlab) 當我用命令窗口中測試,那麼結果:
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(-)
所以如何在運行命令時輸入密碼短語shell_exec