feat:
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
mol
2024-01-27 13:00:12 +08:00
parent 5d1776632b
commit 10b8923d05
3 changed files with 85 additions and 7 deletions

View File

@ -5,11 +5,19 @@ if [ -n "$ROOT_PASSWD" ]; then
echo "密码设置完毕" >> /app/info.log
fi
if [ -n "$GIT_USER" ] && [ -n "$GIT_EMAIL" ]; then
if [ -e "/root/.gitconfig" ]; then
echo "git配置文件已存在" >> /app/info.log
else
touch /root/.gitconfig
echo "git配置文件已创建" >> /app/info.log
fi
# git使用openssh的shh程序
git config --global core.sshCommand "/usr/bin/ssh"
if [ -n "$GIT_USER" ] && [ -n "$GIT_EMAIL" ]; then
git config --global user.name "$GIT_USER"
git config --global user.email "$GIT_EMAIL"
git config --global core.sshCommand "/usr/bin/ssh"
echo "git 用户已设置完毕" >> /app/info.log
fi
@ -19,5 +27,6 @@ if [ -n "$DOCKER_USER" ] && [ -n "$DOCKER_PASSWD" ]; then
fi
service ssh start >> /app/info.log
ssh-agent bash >> /app/info.log
tail -f /app/info.log