Skip to content

Repositories are broken after unsuccessful clone/mirror creation #1249

Closed
@cookiengineer

Description

@cookiengineer
  • Git version: 1.1.0
  • Operating system: Arch Linux (both ARM and amd64)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: -

Description

When cloning a big repository on a slow (or time-outing) internet connection, the repository will be invalid and show a 500 error if the connection was interrupted or the cloning process was unsuccessful. You have to manually connect to the database on the machine and to remove all entries related to the repository to make it work again (or to retry cloning). This is bad error handling :-/

Expected Behaviour

Cloning process should be asynchronous and schedule it in the background, and not depend on the web interface opened up in the web browser. If clone fails, a message would be nice with an option to quickly delete the broken repository (or to try it again).

Steps to Reproduce

  • Use gitea on a cable connected machine (for easy reproduction)
  • Click + and create new repository
  • Migrate or clone a big repository from the interwebz
  • While cloning, pull the cable from the machine
  • Voila, repository is broken with 500 error

Alternative Steps to Reproduce

Disconnect Modem or use a network-wide Proxy with latency (e.g. TOR).

This issue is not dependent on whether giteaserver <> usermachine are connected or not. If git clone fails, repo is broken and browser will not receive any data in its never-ending request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions