您的位置:首页 > 运维架构 > Shell

linux shell脚本获取git代码

2015-10-22 16:04 537 查看
#!/usr/bin/expect

set timeout 300

spawn git checkout feature/development

spawn git fetch

expect {

    "Password:" { send "××××××\r" }

}

interact

spawn git pull

expect {

    "Password:" { send "××××××\r" }

}

interact

~
~

Ps: 需要安装expect工具

yum install expect
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: