lindell / multi-gitter

Update multiple repositories in with one command

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not push changes: object not found

njzjz opened this issue · comments

Describe the bug

Got Could not push changes: object not found error when Pushing changes to remote.

To Reproduce
Steps to reproduce the behavior:

  1. Run
multi-gitter run "python $PWD/run-mirror-gitee.py" --author-email "48687836+njzjz-bot@users.noreply.github.com" --author-name "njzjz-bot[bot]" -B mirror-gitee --fork -m 'CI: Mirror the repository to Gitee

See https://github.com/njzjz-bot/njzjz-bot/issues/3.
' -R deepmodeling/dpgen2
  1. See error:
INFO[0000] Running on 1 repositories
INFO[0000] Cloning and running script                    repo=deepmodeling/dpgen2
INFO[0000] Forking repository                            repo=deepmodeling/dpgen2
INFO[0001] Pushing changes to remote                     repo=deepmodeling/dpgen2
INFO[0001] could not push changes: object not found      repo=deepmodeling/dpgen2
Could not push changes: object not found:
  deepmodeling/dpgen2

Expected behavior

It can be pushed to the forked repository successfully.

Additional context

INFO[0001] Pushing changes to remote                     repo=deepmodeling/dpgen2
INFO[0001] could not push changes: object not found      repo=deepmodeling/dpgen2
TRAC[0001] github.com/lindell/multi-gitter/internal/multigitter.(*Runner).runSingleRepo                                                                                      /home/runner/work/multi-gitter/multi-gitter/internal/multigitter/run.go:341
github.com/lindell/multi-gitter/internal/multigitter.(*Runner).Run.func2                                                                                                     /home/runner/work/multi-gitter/multi-gitter/internal/multigitter/run.go:135
github.com/lindell/multi-gitter/internal/multigitter.runInParallel.func1                                                                                                     /home/runner/work/multi-gitter/multi-gitter/internal/multigitter/run.go:208
runtime.goexit                                                                                                                                                               /opt/hostedtoolcache/go/1.21.8/x64/src/runtime/asm_amd64.s:1650
Could not push changes: object not found:
  deepmodeling/dpgen2

I resolve the issue by using --git-type cmd .

It seems something went wrong with --git-type go.

Thanks for the bug report and for trying with --git-type cmd, it seems to be a bug with go-git.
Does this happen for one specific repository or all?

In the case it's one specific one. Could you please try to make a minimally reproducible repo?

I updated 40 repositories in total, and 9 of them had problems.

For each of these 9 repositories, the forked repository has been created before, and the default branch is behind that of the upstream repository. Other repositories were just forked, and the default branch is up-to-date.