git-shallow-clone-orb
git-shallow-clone-orb copied to clipboard
Setting git config to use ssh instead of https breaks cloning from public repositories
This line in git clone shallow:
git config --global url."ssh://[email protected]".insteadOf "https://github.com" || true
Is causing composer install to fail with:
[RuntimeException]
Failed to clone https://github.com/Pi-George/laminas-file.git via https, ssh protocols, aborting.
- https://github.com/Pi-George/laminas-file.git
Cloning into bare repository '/root/.cache/composer/vcs/https---github.com-Pi-George-laminas-file.git'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
- [email protected]:Pi-George/laminas-file.git
Cloning into bare repository '/root/.cache/composer/vcs/https---github.com-Pi-George-laminas-file.git'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Also worth noting, checkout is checking out a bitbucket repo, not a github repo.
Need more info, including reproduce step would be appreciated.