mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-10 05:56:26 +00:00
Merge 753c372d87
into b7f96b2ea1
This commit is contained in:
commit
68bc6921d9
1 changed files with 9 additions and 1 deletions
|
@ -55,6 +55,7 @@ import type {
|
||||||
StorageConfig,
|
StorageConfig,
|
||||||
TreeItem,
|
TreeItem,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
import { getGitEnvironmentVariables } from './auth';
|
||||||
|
|
||||||
export { setNoVerify } from './config';
|
export { setNoVerify } from './config';
|
||||||
export { setPrivateKey } from './private-key';
|
export { setPrivateKey } from './private-key';
|
||||||
|
@ -353,6 +354,13 @@ export async function cloneSubmodules(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
submodulesInitizialized = true;
|
submodulesInitizialized = true;
|
||||||
|
const gitSubmoduleAuthEnvironmentVariables = getGitEnvironmentVariables();
|
||||||
|
const gitEnv = {
|
||||||
|
// pass all existing env variables
|
||||||
|
...process.env,
|
||||||
|
// add all known git variables
|
||||||
|
...gitSubmoduleAuthEnvironmentVariables,
|
||||||
|
};
|
||||||
await syncGit();
|
await syncGit();
|
||||||
const submodules = await getSubmodules();
|
const submodules = await getSubmodules();
|
||||||
for (const submodule of submodules) {
|
for (const submodule of submodules) {
|
||||||
|
@ -366,7 +374,7 @@ export async function cloneSubmodules(
|
||||||
try {
|
try {
|
||||||
logger.debug(`Cloning git submodule at ${submodule}`);
|
logger.debug(`Cloning git submodule at ${submodule}`);
|
||||||
await gitRetry(() =>
|
await gitRetry(() =>
|
||||||
git.submoduleUpdate(['--init', '--recursive', submodule]),
|
git.env(gitEnv).submoduleUpdate(['--init', '--recursive', submodule]),
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
|
Loading…
Reference in a new issue