Unadopted repositories - can't see any :/ #6820

Closed
opened 2025-11-02 07:07:27 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @replay111 on GitHub (Feb 7, 2021).

  • Gitea version (or commit ref): Gitea version 1.13.2 built with GNU Make 4.1, go1.15.7 : bindata, sqlite, sqlite_unlock_notify
  • Git version:git version 2.24.3 (Apple Git-128)
  • Operating system: OSX Catalina, downloaded from GitHub releases page, no special configuration
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I have a main repository on cloud servers (Gitlab and GitHub) and a local copy (mirror) of those repositories.
I wanted to have them exposed locally by some nice interface so I mounted my local copies with NFS and started gate:

sudo mount -o resvport,rw -t nfs $SERVER:/export/repo/git/repo $LOCAL_DIR

$SERVER - is Ip of my storage where I keep copy from cloud servers
$LOCAL_DIR - path on my machine for tests.

I started Gitea and during configuration I pointed that my git repositories are located in place which is pointed by LOCAL_DIR variable.
When Gitea started I went to admin page and to repositories tab.
I choose the unadopted repositories and hit search to find any.... result is empty.
Content of the directory is like this:

./octant.git
./echoip.git
./pgmodeler.git
./gitlist.git
./anychart/AnyChart.git
./chartjs/Chart.js.git
./docker-osx/Docker-OSX.git
./amigoscode/spring-boot-security-course.git
./amigoscode/login-registration-backend.git

So a couple of repositories are in main dir and a couple are as a subdirs... but Gitea can't find anything....

This is a new installation of Gitea, and those repositories were never be a part of Gitea.
Is it possible to scan and add new repositories from file system (like I described in #11473) without adding them manually to Gitea?

Screenshots

none.

Originally created by @replay111 on GitHub (Feb 7, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): Gitea version 1.13.2 built with GNU Make 4.1, go1.15.7 : bindata, sqlite, sqlite_unlock_notify - Git version:git version 2.24.3 (Apple Git-128) - Operating system: OSX Catalina, downloaded from GitHub releases page, no special configuration - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description I have a main repository on cloud servers (Gitlab and GitHub) and a local copy (mirror) of those repositories. I wanted to have them exposed locally by some nice interface so I mounted my local copies with NFS and started gate: ``` sudo mount -o resvport,rw -t nfs $SERVER:/export/repo/git/repo $LOCAL_DIR ``` $SERVER - is Ip of my storage where I keep copy from cloud servers $LOCAL_DIR - path on my machine for tests. I started Gitea and during configuration I pointed that my git repositories are located in place which is pointed by LOCAL_DIR variable. When Gitea started I went to admin page and to repositories tab. I choose the ```unadopted repositories``` and hit search to find any.... result is empty. Content of the directory is like this: ``` ./octant.git ./echoip.git ./pgmodeler.git ./gitlist.git ./anychart/AnyChart.git ./chartjs/Chart.js.git ./docker-osx/Docker-OSX.git ./amigoscode/spring-boot-security-course.git ./amigoscode/login-registration-backend.git ``` So a couple of repositories are in main dir and a couple are as a subdirs... but Gitea can't find anything.... This is a new installation of Gitea, and those repositories were never be a part of Gitea. Is it possible to scan and add new repositories from file system (like I described in #11473) without adding them manually to Gitea? ## Screenshots none.
GiteaMirror added the issue/not-a-bug label 2025-11-02 07:07:27 -06:00
Author
Owner

@zeripath commented on GitHub (Feb 7, 2021):

For gitea to adopt a repository it has to be in the correct place:

$GITEA_REPOSITORIES/owner/reponame.git

The owning user has to already exist.

@zeripath commented on GitHub (Feb 7, 2021): For gitea to adopt a repository it has to be in the correct place: ``` $GITEA_REPOSITORIES/owner/reponame.git ``` The owning user has to already exist.
Author
Owner

@replay111 commented on GitHub (Feb 7, 2021):

Does it support subdirectories?
Now I have:
/repositories this is main directory for repositories and inside I have:

owner/github/repoiname.git
owner/github/amigoscode/repoiname.git

Should this work?

@replay111 commented on GitHub (Feb 7, 2021): Does it support subdirectories? Now I have: ```/repositories``` this is main directory for repositories and inside I have: ``` owner/github/repoiname.git owner/github/amigoscode/repoiname.git ``` Should this work?
Author
Owner

@zeripath commented on GitHub (Feb 7, 2021):

No.

The directory structure has to exactly match that which Gitea would produce.

Please, note once Gitea has adopted the repository - only gitea should be writing to the repository.

@zeripath commented on GitHub (Feb 7, 2021): No. The directory structure has to exactly match that which Gitea would produce. Please, note once Gitea has adopted the repository - only gitea should be writing to the repository.
Author
Owner

@replay111 commented on GitHub (Feb 7, 2021):

I just want to use Gitea as a viewer so I will not use it to pull/push code. So even if I do the update the changes will be reflected. It is a pitty that Gitea does not support importing/adopting repositories from subdirectories :(

@replay111 commented on GitHub (Feb 7, 2021): I just want to use Gitea as a viewer so I will not use it to pull/push code. So even if I do the update the changes will be reflected. It is a pitty that Gitea does not support importing/adopting repositories from subdirectories :(
Author
Owner

@zeripath commented on GitHub (Feb 7, 2021):

I don't what to say. What you want, Gitea cannot be. It has to control access it has to be the one in control for it to do all of the other things it does.

@zeripath commented on GitHub (Feb 7, 2021): I don't what to say. What you want, Gitea cannot be. It has to control access it has to be the one in control for it to do all of the other things it does.
Author
Owner

@replay111 commented on GitHub (Feb 7, 2021):

Maybe - but still even if I want to use it as a primary repo manager I would be much happier to be able to use subdirectories - like logical organizing projects and subprojetts instead of having everything on the same level (on org level for instance).

What I want from Gitea it is not a problem - as long as it can handle repositories organized in subdirs - not only like it has now - the rest is not the issue :(

@replay111 commented on GitHub (Feb 7, 2021): Maybe - but still even if I want to use it as a primary repo manager I would be much happier to be able to use subdirectories - like logical organizing projects and subprojetts instead of having everything on the same level (on org level for instance). What I want from Gitea it is not a problem - as long as it can handle repositories organized in subdirs - not only like it has now - the rest is not the issue :(
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6820