Skip to content

### Describe the bug #1347

@lujosegouveia-cmyk

Description

@lujosegouveia-cmyk

Describe the bug

Please see ## Steps to reproduce the behavior.

> gh --version
gh version 1.10.3 (2021-05-21)
https://github.com/cli/cli/releases/tag/v1.10.3

Steps to reproduce the behavior

  1. Clone any repo. For this test, I cloned this repo with git repo clone cli/cli.
  2. Run gh repo fork --remote=true --clone=true (or git repo fork and select the equivalent of those arguments when prompted)
  3. Commit some changes and run git push.
  4. See error:

ERROR: Permission to cli/cli.git denied to $USER.
fatal: Could not read from remote repository

Expected vs actual behavior

When forking a repo, gh should set the default remote to the fork, at least in my opinion.

Obviously, you can just run git push -u origin trunk yourself, replacing trunk with the current branch, or just run git push -u origin --all; however, I think it would make sense for gh repo fork to preform this automatically or at least provide the option to do so.

Logs

N/A

  • _Originalmente postado por @@```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions