Skip to content

"fatal:remote origin already exists" when creating repo #2166

@Emojigit

Description

@Emojigit

Describe the bug

Version

gh version 1.1.0 (2020-10-06)
https://github.com/cli/cli/releases/latest

Problem

When I want to create a GitHub repo via gh repo create Username/RepoName, I got some error.

Steps to reproduce the behavior

  1. Type the command gh repo create Username/new_repo_name
  2. View the output
  3. You will see error "fatal: remote origin already exists"

Expected vs actual behavior

  • Expected: I can create then clone the repo with gh repo create
  • actual behavior: I can create the repo, but can't clone it. I need to run gh repo clone to clone it.

Logs

$ gh repo create Emojigit/example
? Visibility Public
? This will create 'Emojigit/example' in your current directory. Continue?  Yes
✓ Created repository Emojigit/example on GitHub
fatal: 遠端 origin 已經存在。
git: exit status 128

Translate:

  1. 遠端: remote
  2. 已經存在: already exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions