feat: update git credential

This commit is contained in:
2026-06-26 11:10:23 +08:00
parent 84c7f37c53
commit 9551225ee9
7 changed files with 66 additions and 33 deletions
+6 -2
View File
@@ -10,7 +10,9 @@ usage() {
用法: git-init
备份已有 ~/.gitconfig,软链接到 ~/.dotfile/git/.gitconfig。
同时为 git-credential-linux.sh 添加可执行权限。
同时为 git-credential.sh 添加可执行权限。
凭据由 ~/.dotfile/git/git-credential.sh 处理(兼容 Git < 2.36,低版本回退 store)。
选项:
-h, --help 显示此帮助
@@ -28,4 +30,6 @@ if [ -f "$src" ]; then
fi
ln -s "$HOME/.dotfile/git/.gitconfig" "$src"
chmod +x "$HOME/.dotfile/git/git-credential-linux.sh"
chmod +x "$HOME/.dotfile/git/git-credential.sh"
# 兼容旧路径:若仍存在则保持可执行
chmod +x "$HOME/.dotfile/git/git-credential-linux.sh" 2>/dev/null || true