使用 Git 凭证存储

# 在192.168.0.21上执行
cd /home/wcs/wcs-knowledge/docs/knowledge

# 1. 设置凭证存储(第一次会提示输入)
git config --global credential.helper store

# 2. 执行一次需要认证的操作(会保存凭证)
# 如果当前remote是HTTPS,执行:
git pull

# 输入你的GitLab用户名和密码(或访问令牌)
# 凭证会被保存到 ~/.git-credentials

# 3. 或者直接编辑凭证文件
echo "https://用户名:密码或令牌@你的gitlab地址" > ~/.git-credentials
chmod 600 ~/.git-credentials