Skip to content

Martchus/gogs2gitea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

gogs2gitea

  • Simple script to migrate repositories from Gogs to Gitea using the migration feature of Gitea.
  • Before running the script, set the the environment variables for URLs and credentials (see the very top of the script).
  • Needs Perl and Mojolicious for Mojo::UserAgent. Under Arch Linux, install perl-mojolicious from the AUR.
  • Does not allow to migrate only specific repos so far. But the point of this script is to move everything at once. For migrating single repos Gitea's web interface for migrations would be good enough anyways.

Further useful commands

Remove remote from all local Git working copies, e.g.:

find -path '*/.git' -exec git -C {}/.. remote remove gogs \;

Remove/migrate URLs still present on other¹ remotes, e.g.:

find -path '*/.git/config' -exec sed -i -e '/pushurl = gogs@martchus.dyn.f3l.de:Martchus/d' -e 's/url = gogs@martchus.dyn.f3l.de:Martchus/url = gitea@martchus.dyn.f3l.de:Martchus/g' {} \;

¹I sometimes create remotes with multiple push URLs for pushing to multiple servers at once.

About

Simple script to migrate repositories from Gogs to Gitea

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages