Hi I am new to Gitea.
I am trying to migrate my old git repo’s to Gitea I only used the command line and git bash never a web git Application like gitea.
I tried to migrate my nagios repo that I have on the same server into gitea but it dosn’t work and everywhere I look I only find migration between Github and Gitea.
Can somebody help me with that?
You have a few options here.
- You can set
IMPORT_LOCAL_PATHS
totrue
in the[security]
section of your app.ini and then migrate them from a local path.
Link to docs forIMPORT_LOCAL_PATHS
- You can set Gitea as a new remote from a checked out repository and then push.
git remote add gitea https://my.gitea/user/repo.git
andgit push gitea --all && git push gitea --tags
If you do the latter, you can either create the repo first in the web UI, or enable push-to-create, in which Gitea will create non-existent repositories for you when you first push to them.
Link to docs for ENABLE_PUSH_CREATE_USER
I’ve set the IMPORT_LOCAL_PATHS
to true and restarted Gitea service.
Now, how the migration can be done, please?
I think you can just input the repository path on the server into the box and click import?
Hello lunny,
you are right.
app.ini:
…
ALLOWED_DOMAINS =
ALLOW_LOCALNETWORKS = true
…
Migrate / Clone From URL: git://czjih1lgit1.mmemea.marelliad.net:/var/git/psr.git
Username and password: Correct, checked several times.
When I click “Migrate Repository” buttn, I receive this error: You cannot import from disallowed hosts, please ask the admin to check ALLOWED_DOMAINS/ALLOW_LOCALNETWORKS/BLOCKED_DOMAINS settings.
Both, source git server and the gitea server are in the same subnet.
Because you are using a domain as remote site. It has been consider as a domain system but not a local network. So you need to add czjih1lgit1.mmemea.marelliad.net
to your ALLOWED_DOMAINS =
.
Hello lunny,
thanks for your support.
I’ve solved ‘migration from git to gitea’ problem already by configuration change and installing git-daemon-dun on my Debian box.
More information can be found here: Migrate repository Gitea to another Gitea server - #7 by HappyFrog