Skip to content

gh repo clone https://github.com/xxx/yyy should respect git_protocol config rather than using the protocol scheme #9026

Open
@alexjurkiewicz

Description

@alexjurkiewicz

Describe the bug

When cloning a repository by the Github web UI URL, git_protocol is not respected.

❯ gh --version
gh version 2.48.0 (2024-04-17)
https://github.com/cli/cli/releases/tag/v2.48.0
❯ gh config set git_protocol ssh
❯ gh repo clone https://github.com/xxx/yyy
Cloning into 'reporting'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/xxx/yyy.git/'
failed to run git: exit status 128

Expected vs actual behavior

I would expect gh to respect git_protocol, which it does when you specify gh repo clone xxx/yyy

Thank you!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedenhancementa request to improve CLIgh-reporelating to the gh repo command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions