Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Setting git config to use ssh instead of https breaks cloning from public repositories #31

Description

@Pi-George

This line in git clone shallow:

git config --global url."ssh://git@github.com".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'...  
    git@github.com: Permission denied (publickey).                                                             
    fatal: Could not read from remote repository.                                                              
                                                                                                               
    Please make sure you have the correct access rights                                                        
    and the repository exists.                                                                                 
                                                                                                               
  - git@github.com:Pi-George/laminas-file.git                                                                  
    Cloning into bare repository '/root/.cache/composer/vcs/https---github.com-Pi-George-laminas-file.git'...  
    git@github.com: 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions