Skip to content

Pushmirror from gitea to gitea throws error #36736

@TDesjardins

Description

@TDesjardins

Description

If you have two repos on gitea and configure one (http://localhost:3000/org/source-repo.git) to have a push mirror on the other (http://localhost:3000/org/dest-repo.git) the first sync will success but the update may be fail:

PushRejected Error: remote: 
remote: error:        
remote: error: branch mirror-head is the default branch and cannot be deleted        
remote: error:        
To http://localhost:3000/org/dest-repo.wiki.git
 ! [remote rejected]   mirror-head (pre-receive hook declined)
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'http://localhost:3000/org/dest-repo.wiki.git'
 - remote: 
remote: error:        
remote: error: branch mirror-head is the default branch and cannot be deleted        
remote: error:        
To http://localhost:3000/org/dest-repo.wiki.git
 ! [remote rejected]   mirror-head (pre-receive hook declined)
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'http://localhost:3000/org/dest-repo.wiki.git'
: remote: 
remote: error:        
remote: error: branch mirror-head is the default branch and cannot be deleted        
remote: error:        
To http://localhost:3000/org/dest-repo.wiki.git
 ! [remote rejected]   mirror-head (pre-receive hook declined)
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'http://localhost:3000/org/dest-repo.wiki.git'

Seems that has something todo with the wiki. There is an existing wiki in the dest-repo but actually the wiki is a gitea specific separate repo, right?

Gitea Version

1.25.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Self hosted docker

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions