feat(git): enhance token authentication and credential handling

This commit is contained in:
Bohdan Triapitsyn
2026-01-14 02:54:48 +02:00
parent fa83c1e645
commit 1319033df9
7 changed files with 11 additions and 56 deletions
-4
View File
@@ -177,18 +177,14 @@ export async function setLocalIdentity(directory, profile) {
false,
'local'
);
// Clear credential helper if previously set for token auth
await git.raw(['config', '--local', '--unset', 'credential.helper']).catch(() => {});
} else if (authType === 'token' && profile.host) {
// For token auth, configure git to use the store credential helper
// which reads from ~/.git-credentials
await git.addConfig(
'credential.helper',
'store',
false,
'local'
);
// Clear SSH command if previously set
await git.raw(['config', '--local', '--unset', 'core.sshCommand']).catch(() => {});
}