yum安装expect
编写一下sh脚本,另存为gitpull.sh
#!/usr/bin/expect # cd /home/wwwroot/b2c_aaa spawn git pull expect "git@1.1.1.4's password:" exp_send "git\r" interact
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3