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,
|
||||
})
|
||||
|
||||
if (authHeader) {
|
||||
await git.clone(
|
||||
cloneUrl,
|
||||
path,
|
||||
[
|
||||
"--bare",
|
||||
"-c",
|
||||
`http.extraHeader=${authHeader}`,
|
||||
]
|
||||
)
|
||||
} else {
|
||||
await git.clone(
|
||||
cloneUrl,
|
||||
path,
|
||||
[
|
||||
"--bare",
|
||||
]
|
||||
)
|
||||
}
|
||||
const cloneArgs = [
|
||||
"--bare",
|
||||
...(authHeader ? ["-c", `http.extraHeader=${authHeader}`] : [])
|
||||
];
|
||||
|
||||
await git.clone(cloneUrl, path, cloneArgs);
|
||||
|
||||
await unsetGitConfig(path, ["remote.origin.url"]);
|
||||
} catch (error: unknown) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue