cleanup authheader usage

This commit is contained in:
msukkari 2025-09-27 15:59:48 -07:00
parent c40576d0a5
commit c5a921fff5

View file

@ -26,25 +26,12 @@ export const cloneRepository = async (
path, path,
}) })
if (authHeader) { const cloneArgs = [
await git.clone(
cloneUrl,
path,
[
"--bare", "--bare",
"-c", ...(authHeader ? ["-c", `http.extraHeader=${authHeader}`] : [])
`http.extraHeader=${authHeader}`, ];
]
) await git.clone(cloneUrl, path, cloneArgs);
} else {
await git.clone(
cloneUrl,
path,
[
"--bare",
]
)
}
await unsetGitConfig(path, ["remote.origin.url"]); await unsetGitConfig(path, ["remote.origin.url"]);
} catch (error: unknown) { } catch (error: unknown) {