Skip to content

Github upload fails if no branch exists upstream (On blank repositories) #36

@NicoHood

Description

@NicoHood

How to reproduce:

  1. Create a whole new repository via Github
  2. Clone it locally
  3. Make a commit but don't push
  4. Run gpgit and it will fail

The error:

==> 5. Upload the release
  -> 5.1 Configure HTTPS download server
    Github uses well configured https.
  -> 5.2 Upload to Github
    Creating new Github release '0.2.0'.
==> ERROR: Github API message: 'Validation Failed'. Check your token configuration: https://github.com/settings/tokens

The error is quite missleading. It happens because no branch exists upstream, so the release cannot be tagged onto that branch. We should either push the current branch (which has pro & cons) or detect that issue as early as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions