shell脚本自动拉取git代码

#!/bin/bash
CONUSER='username'
CONPASS='password'

cd /data/web/
git reset --hard
expect -c "spawn git clone https://gitlabcd.uniontech.com/autotest/cd-desktop-app.git; expect "*Username*" { send "${CONUSER} "; exp_continue } "*Password*" { send "${CONPASS} " }; interact"

没伞的孩子,就要学会在雨中奔跑!
原文地址:https://www.cnblogs.com/mikigo/p/13730242.html