Compare commits

..

No commits in common. "1815c3c8800c1b98c8ec68c29d4c3194294c2f62" and "a1f3d9ecd487c69eaaf84f47d208ba27766f73a6" have entirely different histories.

4 changed files with 4 additions and 36 deletions

View File

@ -8,10 +8,6 @@ permissions:
checks: write
contents: read
actions: write
packages: read
pull-requests: write
statuses: write
id-token: write
env:
GKE_ZONE: 'us-central1'

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View File

@ -224,29 +224,6 @@ export class RemoteClient {
if (!CloudRunner.buildParameters.skipLfs) {
try {
RemoteClientLogger.log(`Attempting to pull LFS files with GIT_PRIVATE_TOKEN...`);
// Configure git to use GIT_PRIVATE_TOKEN
const gitPrivateToken = process.env.GIT_PRIVATE_TOKEN;
if (!gitPrivateToken) {
throw new Error('GIT_PRIVATE_TOKEN is not available');
}
// Clear any existing URL configurations
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
// Set new URL configuration with token
await CloudRunnerSystem.Run(
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "https://github.com/"`,
);
await CloudRunnerSystem.Run(
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "ssh://git@github.com/"`,
);
await CloudRunnerSystem.Run(
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "git@github.com"`,
);
await CloudRunnerSystem.Run(`git lfs pull`);
RemoteClientLogger.log(`Successfully pulled LFS files with GIT_PRIVATE_TOKEN`);
assert(fs.existsSync(CloudRunnerFolders.lfsFolderAbsolute));
@ -261,20 +238,15 @@ export class RemoteClient {
throw new Error('GITHUB_TOKEN is not available as fallback');
}
// Clear any existing URL configurations
await CloudRunnerSystem.Run(`git config --global --unset-all url."https://github.com/".insteadOf`);
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf`);
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf`);
// Set new URL configuration with token
// Configure git to use GITHUB_TOKEN
await CloudRunnerSystem.Run(
`git config --global url."https://${githubToken}@github.com/".insteadOf "https://github.com/"`,
`git config --global --replace-all url."https://token:${githubToken}@github.com/".insteadOf ssh://git@github.com/`,
);
await CloudRunnerSystem.Run(
`git config --global url."https://${githubToken}@github.com/".insteadOf "ssh://git@github.com/"`,
`git config --global --add url."https://token:${githubToken}@github.com/".insteadOf git@github.com`,
);
await CloudRunnerSystem.Run(
`git config --global url."https://${githubToken}@github.com/".insteadOf "git@github.com"`,
`git config --global --add url."https://token:${githubToken}@github.com/".insteadOf "https://github.com/"`,
);
await CloudRunnerSystem.Run(`git lfs pull`);