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}\n\"; exp_continue } \"*Password*\" { send \"${CONPASS}\n\" }; interact"

posted @ 2020-09-25 15:04  mikigo  阅读(3279)  评论(0编辑  收藏  举报