Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Migrate repositories from a HTTP URL, local disk or SSH URL #22

Open
lunny opened this issue Apr 26, 2019 · 6 comments
Open

Migrate repositories from a HTTP URL, local disk or SSH URL #22

lunny opened this issue Apr 26, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@lunny
Copy link
Member

lunny commented Apr 26, 2019

If we can implement a sub command migrate, that will be helpful.

# migrate from a http URL
tea --login=try migrate https://github.com/go-gitea/tea.git --name=gitea/tea

# migrate from local disk
tea --login=try migrate ./tea.git --name=gitea/tea

# migrate from a SSH URL, clone from ssh and then upload from local disk
tea --login=try migrate git@github.com:go-gitea/tea.git --name=gitea/tea
@lunny lunny added the enhancement New feature or request label Apr 26, 2019
@lunny lunny changed the title Migrate repositories from a git URL or local disk Migrate repositories from a HTTP URL, local disk or SSH URL Apr 26, 2019
@noerw
Copy link
Member

noerw commented Apr 26, 2019

I'm not well informed about the architecture, but afaik the gitea server implements migration logic for all these cases..
If so, the CLI shouldn't need to push from local disk, but trigger the migration on server side for the HTTP/SSH URL case.
This way the local clone can be made optional (with a --clone BooleanFlag?), which might be of interest for large automated migrations.

@lafriks
Copy link
Member

lafriks commented Apr 26, 2019

@noerw gitea does not implement migration from local path

@techknowlogick
Copy link
Member

@lafriks I think it does, but is disabled by default.

@lafriks
Copy link
Member

lafriks commented Apr 26, 2019

but from server disk but this would be way to migrate from users local disk

@lunny
Copy link
Member Author

lunny commented Apr 26, 2019

Yes, just like @lafriks said. This in fact will do three steps when migrate from local disk:

  1. create a repo on gitea server
  2. git add remote to that gitea server repo
  3. push to remote server.

The original migration from disk will migrate from gitea server's disk but not guest's.

@lunny
Copy link
Member Author

lunny commented Apr 26, 2019

This command also could be some part of scripts to batch migrate local git repositories to gitea server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants