mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-10 14:06:30 +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,
|
||||
TreeItem,
|
||||
} from './types';
|
||||
import { getGitEnvironmentVariables } from './auth';
|
||||
|
||||
export { setNoVerify } from './config';
|
||||
export { setPrivateKey } from './private-key';
|
||||
|
@ -353,6 +354,13 @@ export async function cloneSubmodules(
|
|||
return;
|
||||
}
|
||||
submodulesInitizialized = true;
|
||||
const gitSubmoduleAuthEnvironmentVariables = getGitEnvironmentVariables();
|
||||
const gitEnv = {
|
||||
// pass all existing env variables
|
||||
...process.env,
|
||||
// add all known git variables
|
||||
...gitSubmoduleAuthEnvironmentVariables,
|
||||
};
|
||||
await syncGit();
|
||||
const submodules = await getSubmodules();
|
||||
for (const submodule of submodules) {
|
||||
|
@ -366,7 +374,7 @@ export async function cloneSubmodules(
|
|||
try {
|
||||
logger.debug(`Cloning git submodule at ${submodule}`);
|
||||
await gitRetry(() =>
|
||||
git.submoduleUpdate(['--init', '--recursive', submodule]),
|
||||
git.env(gitEnv).submoduleUpdate(['--init', '--recursive', submodule]),
|
||||
);
|
||||
} catch (err) {
|
||||
logger.warn(
|
||||
|
|
Loading…
Reference in a new issue