Skip to content

Cloning a fork with SSH results in upstream with HTTPS protocol #736

Description

@bendavies

Describe the bug

When cloning a fork, upstream protocol should match origin.

Steps to reproduce the behavior

If I forked this repo:

  1. gh repo clone [email protected]:bendavies/cli.git

Expected vs actual behavior

Actual:

git remote -v
origin	[email protected]:bendavies/cli.git (fetch)
origin	[email protected]:bendavies/cli.git (push)
upstream	https://github.com/cli/cli.git (fetch)
upstream	https://github.com/cli/cli.git (push)

Expected:

git remote -v
origin	[email protected]:bendavies/cli.git (fetch)
origin	[email protected]:bendavies/cli.git (push)
upstream	[email protected]:cli/cli.git (fetch)
upstream	[email protected]:cli/cli.git (push)

Activity

  1. changed the title [-]When cloning a fork, upstream protocol should match orogin.[/-] [+]When cloning a fork, upstream protocol should match origin.[/+] on Apr 2, 2020
  2. mislav commented on Apr 3, 2020

    @mislav
    Contributor

    Hi thank you for reporting! This is related to the feature we are planning in #546, but I agree with this being labeled "bug" because SSH mode should have been inferred from your clone argument even if there wasn't a configuration option. 👍

  3. changed the title [-]When cloning a fork, upstream protocol should match origin.[/-] [+]Cloning a fork with SSH results in upstream with HTTPS protocol[/+] on Apr 3, 2020
  4. vilmibm commented on May 13, 2020

    @vilmibm
    Contributor

    gh repo clone now respects the git_protocol setting, so I'm gonna close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions