diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f17f711f..32b7b30e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,4 +27,4 @@ jobs: - name: Run Tests run: | - docker-compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml tests \ No newline at end of file + docker compose exec -T tests vendor/bin/phpunit --configuration phpunit.xml tests \ No newline at end of file diff --git a/src/VCS/Adapter/Git/GitHub.php b/src/VCS/Adapter/Git/GitHub.php index 0b3efab9..15ef158e 100644 --- a/src/VCS/Adapter/Git/GitHub.php +++ b/src/VCS/Adapter/Git/GitHub.php @@ -516,8 +516,9 @@ public function generateCloneCommand(string $owner, string $repositoryName, stri // URL encode the components for the clone URL $owner = urlencode($owner); $repositoryName = urlencode($repositoryName); - $accessToken = urlencode($this->accessToken); - $cloneUrl = "https://{$owner}:{$accessToken}@github.com/{$owner}/{$repositoryName}"; + $accessToken = !empty($this->accessToken) ? ':' . urlencode($this->accessToken) : ''; + + $cloneUrl = "https://{$owner}{$accessToken}@github.com/{$owner}/{$repositoryName}"; $directory = escapeshellarg($directory); $rootDirectory = escapeshellarg($rootDirectory);