在容器初始化时自动设置 git 用户名和邮箱

This commit is contained in:
2025-05-01 11:37:33 +08:00
parent e72777d6fd
commit e7dba754eb

View File

@@ -74,6 +74,10 @@ EOF
echo "SSH key pair created. Your public key is:" echo "SSH key pair created. Your public key is:"
cat ~/.ssh/git.pub cat ~/.ssh/git.pub
# 添加 git 全局配置
git config set --global user.name "${data.coder_workspace_owner.me.name}"
git config set --global user.email "${data.coder_workspace_owner.me.email}"
touch ~/.init_done touch ~/.init_done
fi fi