From 9464f67397f1bf31a16b2be0baf51f8bfdef18c5 Mon Sep 17 00:00:00 2001 From: James Ives Date: Wed, 27 Nov 2019 08:36:19 -0500 Subject: [PATCH] Private Repository Issue (#71) * git fetch origin does not work in private repositories * Revert "git fetch origin does not work in private repositories" This reverts commit e115e86689d5b4a35d612b2753a97d1e8fe23a58. * Origin issues --- lib/git.js | 2 +- src/git.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.js b/lib/git.js index 81fbe162..bdce914f 100644 --- a/lib/git.js +++ b/lib/git.js @@ -86,7 +86,7 @@ function deploy() { } // Checks out the base branch to begin the deployment process. yield util_1.execute(`git checkout ${constants_1.action.baseBranch || "master"}`, constants_1.workspace); - yield util_1.execute(`git fetch origin`, constants_1.workspace); + yield util_1.execute(`git fetch ${constants_1.repositoryPath}`, constants_1.workspace); yield util_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${constants_1.action.branch}`, constants_1.workspace); /* Pushes all of the build files into the deployment directory. diff --git a/src/git.ts b/src/git.ts index 62aaa867..21a4f543 100644 --- a/src/git.ts +++ b/src/git.ts @@ -76,7 +76,7 @@ export async function deploy(): Promise { // Checks out the base branch to begin the deployment process. await execute(`git checkout ${action.baseBranch || "master"}`, workspace); - await execute(`git fetch origin`, workspace); + await execute(`git fetch ${repositoryPath}`, workspace); await execute( `git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`, workspace