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
Powered by: 博客园 Copyright © 2024 Showker Powered by .NET 9.0 on Kubernetes