[x]
):First of all, I am a newbie to Git stuff. I don't even know how to get to the "Log gist", nor what it is.
Anyway, I am running a plain Git server on a Synology DiskStation. It works well, however I thought that some form of a GUI would be nice, and installed Gitea via Docker. It runs using MariaDB10 as the database.
To be exact: Git server is a native Synology app and runs directly on the server. Gitea and MariaDB both run in Docker, and Gitea seems to have its own Git server, separate from the Synology one.
I am now trying to import my existing repo from the Synology Git server into Gitea via ssh. First, I was getting a message "You are not allowed to import local repositories.", but I fixed it by editing the app.ini. Now I am getting this error: "The local path is invalid. It does not exist or is not a directory." This is nonsense. I used EXACTLY the same ssh path on a Win10 GitGUI client, and my repo was imported in a blink of an eye. For some reason Gitea doesn't like it. How do I fix this? How do I investigate what's the problem?
I could not reproduce this problem on try.gitea.io, because it gave me the "local repositories" error.
Please help!
Import from local repositories is a different feature from SSH clone/push.
Import from local repositories is a different feature from SSH clone/push.
Can you explain a bit more? This is all greek to me...
Anyway, I was able to log into bash of the Docker-Git. I issued the same "git clone ssh://...
" command I tried with Gitea, and it worked!
Still, somehow Gitea doesn't see the repo, even though its own git does see it. Gitea continues to throw the above error when I try the clone.
@mfigrs Unless you have a lot of repositories, I'd recreate the repositories in gitea, set them up as remote on your locale machine and push them. I've recently transferred five repositories that way and it took about ten minutes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Please review the IMPORT_LOCAL_PATHS
option in https://docs.gitea.io/en-us/config-cheat-sheet/ and if you have more support needs, please feel free to open a post in the forum.
Setting IMPORT_LOCAL_PATHS
to true
in app.ini is what allowed me to switch from:
"You are not allowed to import local repositories." error to:
"The local path is invalid. It does not exist or is not a directory." error.
I need a solution to get rid of the second error message - this is a Gitea bug...
Reviewing the ticket again, as Gitea is running in docker it wouldn't have access to your repos via a local path unless you volume mounted them. Are you able to either volume mount the local paths into docker, or put an HTTP URL for migrating instead?
Reviewing the ticket again, as Gitea is running in docker it wouldn't have access to your repos via a local path unless you volume mounted them. Are you able to either volume mount the local paths into docker, or put an HTTP URL for migrating instead?
Unless I am mistaken, the gitea docker container contains a git server. I've connected to that server (inside gitea container) and issued a pull command with ssh path, and it worked! However, when I paste the IDENTICAL path in gitea - it doesn't work. I may be confusing things because it's all new to me, but IMHO this is a gitea bug.
Reviewing the ticket again, as Gitea is running in docker it wouldn't have access to your repos via a local path unless you volume mounted them. Are you able to either volume mount the local paths into docker, or put an HTTP URL for migrating instead?
Even after mounting the local repo in Docker, Gitea cannot seem to find it...
I mounted the local repo volume on /Projects/
in gitea docker (so in root folder), I can confirm it is present and accessible via internal docker bash.
In Gitea web interface, I tried to migrate from /Projects/repo.git
but I get The local path is invalid. It does not exist or is not a directory.
I also tried mounting the Projects
volume inside /data/gitea/Projects/
in case Gitea does not search from root but from its GITEA_CUSTOM
folder (specified when launching the docker image), same thing.
Setting
IMPORT_LOCAL_PATHS
totrue
in app.ini is what allowed me to switch from:
"You are not allowed to import local repositories." error to:
"The local path is invalid. It does not exist or is not a directory." error.I need a solution to get rid of the second error message - this is a Gitea bug...
Most of you, like me, wrong place Good Luck : )
Config Cheat Sheet - Docs
IMPORT_LOCAL_PATHS
: false: Set tofalse
to prevent all users (including admin) from importing local path on server.
Most helpful comment
Setting
IMPORT_LOCAL_PATHS
totrue
in app.ini is what allowed me to switch from:"You are not allowed to import local repositories." error to:
"The local path is invalid. It does not exist or is not a directory." error.
I need a solution to get rid of the second error message - this is a Gitea bug...