Skip to content

Forking forked GitHub Repo fails #14531

@froboy

Description

@froboy

Bug description

Trying to publish a branch to a public GitHub repo you do not have privileges to correctly triggers the "Create Fork" flow, but then forking fails with Git: remote upstream already exists.

Logs report:

[info] > git remote rename origin upstream [2ms]
[info] error: remote upstream already exists.

I also tried to manually remove the upstream before the process with git remote remove upstream but git remote -v reports the upstream remains no matter how I try to remove it.

Steps to reproduce

  • Spin up a GitPod instance on a forked repo (such as https://github.com/YCloudYUSA/yusaopeny_docs)
  • Create a new branch
  • Click "Publish Branch" in the Source Control panel
  • Click "Create Fork" when prompted
  • Observe the error.

Workspace affected

No response

Expected behavior

If an upstream exists, either the new one should have a new name or the existing upstream should be removed.

Example repository

https://github.com/YCloudYUSA/yusaopeny_docs

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions