mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
cleanup authheader usage
This commit is contained in:
parent
c40576d0a5
commit
c5a921fff5
1 changed files with 6 additions and 19 deletions
|
|
@ -26,25 +26,12 @@ export const cloneRepository = async (
|
||||||
path,
|
path,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (authHeader) {
|
const cloneArgs = [
|
||||||
await git.clone(
|
"--bare",
|
||||||
cloneUrl,
|
...(authHeader ? ["-c", `http.extraHeader=${authHeader}`] : [])
|
||||||
path,
|
];
|
||||||
[
|
|
||||||
"--bare",
|
await git.clone(cloneUrl, path, cloneArgs);
|
||||||
"-c",
|
|
||||||
`http.extraHeader=${authHeader}`,
|
|
||||||
]
|
|
||||||
)
|
|
||||||
} 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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue