-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
Cloning a repository through ssh and forking it adds the fork using the https protocol.
❯ gh --version
gh version 0.9.0 (2020-05-27)
https://github.com/cli/cli/releases/tag/v0.9.0
Steps to reproduce the behavior
- Make a temp directory:
cd $(mktemp -d) - Clone a repository via ssh:
gh repo clone git@github.com:cli/cli.git - Navigate into the repository:
cd cli - Fork the repository:
gh repo fork --remote=true - List all remotes:
git remote -v
Expected vs actual behavior
Expected behaviour
The new fork uses the ssh protocol because the repo was originally cloned through that.
Actual behaviour
The fork was added using the https protocol:
❯ git remote -v
origin https://github.com/thomaseizinger/cli.git (fetch)
origin https://github.com/thomaseizinger/cli.git (push)
upstream git@github.com:cli/cli.git (fetch)
upstream git@github.com:cli/cli.git (push)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic