Import Unadopted repositories - nothing happens #9753

Closed
opened 2025-11-02 08:48:38 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @KazzmanK on GitHub (Oct 30, 2022).

Description

I`ve copied existing bare repository from Gitblit server. Put it into folder as said in #18390 . Now I have repository searched through UI.
After clicking on Yes, Adopt - nothing happens, UI brings me back to repository list.
In DevTools I see unadpted/303, and after redirect - repos/200.
In logs there are only templates lines

2022/10/30 12:08:17 ...s/context/context.go:219:HTML() [D] [635e3f01] Template: admin/repo/unadopted
2022/10/30 12:09:29 ...s/context/context.go:219:HTML() [D] [635e3f49-2] Template: admin/repo/list

Tried to set dev RUN_MODE - nothing changed.
Tried to check repository if it is valid bare -

git clone as.git
Cloning into 'as'...
done.

Happens under windows.

My username is Administrator, but disk path is administrator/as.git.
Also tried to rename user to all-lowercase, all the same.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Nothig notable to share

Git Version

2.38

Operating System

Windows server 10.0

How are you running Gitea?

Fresh download, as service and from command line

Database

SQLite

Originally created by @KazzmanK on GitHub (Oct 30, 2022). ### Description I`ve copied existing bare repository from Gitblit server. Put it into <username> folder as said in [#18390 ](https://github.com/go-gitea/gitea/issues/18390). Now I have repository searched through UI. After clicking on Yes, Adopt - nothing happens, UI brings me back to repository list. In DevTools I see unadpted/303, and after redirect - repos/200. In logs there are only templates lines 2022/10/30 12:08:17 ...s/context/context.go:219:HTML() [D] [635e3f01] Template: admin/repo/unadopted 2022/10/30 12:09:29 ...s/context/context.go:219:HTML() [D] [635e3f49-2] Template: admin/repo/list Tried to set dev RUN_MODE - nothing changed. Tried to check repository if it is valid bare - git clone as.git Cloning into 'as'... done. Happens under windows. My username is Administrator, but disk path is administrator/as.git. Also tried to rename user to all-lowercase, all the same. ### Gitea Version 1.17.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots Nothig notable to share ### Git Version 2.38 ### Operating System Windows server 10.0 ### How are you running Gitea? Fresh download, as service and from command line ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:48:38 -06:00
Author
Owner

@lunny commented on GitHub (Oct 30, 2022):

Is the repo searched in the unadopted repositories UI?

@lunny commented on GitHub (Oct 30, 2022): Is the repo searched in the unadopted repositories UI?
Author
Owner

@KazzmanK commented on GitHub (Oct 30, 2022):

Yes, it is,
As I`m complaining - nothing happens after I click
image
image
After clicking Yes it brings back me to
image

And this repository remains unimported

@KazzmanK commented on GitHub (Oct 30, 2022): Yes, it is, As I`m complaining - nothing happens after I click ![image](https://user-images.githubusercontent.com/13328513/198878369-84141a3a-9342-4b8c-bfd6-79f652f37f40.png) ![image](https://user-images.githubusercontent.com/13328513/198878393-2d714864-ada1-416e-8cbb-3a423a19ef45.png) After clicking **Yes** it brings back me to ![image](https://user-images.githubusercontent.com/13328513/198878431-8c63a162-ebb2-44a4-9cc1-4e63674b794e.png) And this repository remains unimported
Author
Owner

@lunny commented on GitHub (Oct 30, 2022):

Could you check if the repository does exist?

@lunny commented on GitHub (Oct 30, 2022): Could you check if the repository does exist?
Author
Owner

@KazzmanK commented on GitHub (Oct 30, 2022):

I'm not sure what you actually mean.
You are asking if I'm trying to import non-existing repo while it was found by UI?

From the beginning I was able to git clone it, once again :

backlog
C:\Gitea\gitea-repositories\username>dir
 Том в устройстве C имеет метку System
 Серийный номер тома: D8FA-8779

 Содержимое папки C:\Gitea\gitea-repositories\username

30.10.2022  22:50    <DIR>          .
30.10.2022  22:50    <DIR>          ..
30.10.2022  22:48    <DIR>          as.git
21.10.2022  10:13    <DIR>          ffp-su.git
               0 файлов              0 байт
               4 папок  42 257 829 888 байт свободно

C:\Gitea\gitea-repositories\username>git clone as.git
Cloning into 'as'...
done.

C:\Gitea\gitea-repositories\username>cd as

C:\Gitea\gitea-repositories\username\as>git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

C:\Gitea\gitea-repositories\username\as>

image
image

But after clicking Yes repository remains unimported

image

What I have found so far :
If I click Delete - it is not working too! Repo remains in its folder.

screenshot

image

@KazzmanK commented on GitHub (Oct 30, 2022): I'm not sure what you actually mean. You are asking if I'm trying to import non-existing repo while it was found by UI? From the beginning I was able to **git clone** it, once again : <details> <summary> backlog </summary> ``` C:\Gitea\gitea-repositories\username>dir Том в устройстве C имеет метку System Серийный номер тома: D8FA-8779 Содержимое папки C:\Gitea\gitea-repositories\username 30.10.2022 22:50 <DIR> . 30.10.2022 22:50 <DIR> .. 30.10.2022 22:48 <DIR> as.git 21.10.2022 10:13 <DIR> ffp-su.git 0 файлов 0 байт 4 папок 42 257 829 888 байт свободно C:\Gitea\gitea-repositories\username>git clone as.git Cloning into 'as'... done. C:\Gitea\gitea-repositories\username>cd as C:\Gitea\gitea-repositories\username\as>git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean C:\Gitea\gitea-repositories\username\as> ``` ![image](https://user-images.githubusercontent.com/13328513/198898898-137fb089-8803-4d91-af76-d1b51d6e07c8.png) ![image](https://user-images.githubusercontent.com/13328513/198898935-5d14ebfa-14b4-499b-8952-3ecdb4ec846d.png) **But after clicking Yes repository remains unimported** ![image](https://user-images.githubusercontent.com/13328513/198899045-130eaf21-565c-4634-8013-9a230318308a.png) </details> What I have found so far : If I click Delete - it is not working too! Repo remains in its folder. <details> <summary> screenshot</summary> ![image](https://user-images.githubusercontent.com/13328513/198899342-ce6ba4b6-5d3c-4c45-8f67-cdb5d290c377.png) </details>
Author
Owner

@KazzmanK commented on GitHub (Oct 30, 2022):

Update
it works with gitea 1.15.0
it is NOT working with 1.16.0
it is NOT working with 1.16.6
it is NOT working with 1.17.3
It works with 1.15.10
Checking 1.15.11....

And, yes, it works in 1.15.11.

So, something happened between 1.15.11 and 1.16.0
I've looked through commits, but I`m far from Golang :(

@KazzmanK commented on GitHub (Oct 30, 2022): Update it works with gitea 1.15.0 it is NOT working with 1.16.0 it is NOT working with 1.16.6 it is NOT working with 1.17.3 It works with 1.15.10 Checking 1.15.11.... And, yes, it works in 1.15.11. So, something happened between 1.15.11 and 1.16.0 I've looked through commits, but I`m far from Golang :(
Author
Owner

@lunny commented on GitHub (Oct 31, 2022):

I couldn't reproduce this in my macOS.

Tried to set dev RUN_MODE - nothing changed.
You need to restart Gitea and you should find more logs.

@lunny commented on GitHub (Oct 31, 2022): I couldn't reproduce this in my macOS. > Tried to set dev RUN_MODE - nothing changed. You need to restart Gitea and you should find more logs.
Author
Owner

@KazzmanK commented on GitHub (Oct 31, 2022):

Know nothing about macos, my install is on windows.
Here are logs in Trace and Debug modes with DEV mode.
app.ini.txt
trace.log
debug.log

ini file is renamed to txt to make it attachable to github.

So far workaround for initial migration to Gitea

  1. Install 1.15.x version
  2. Mass import your repositories via Unadopted
  3. Upgrade to recent Gitea

No workaround for existing installations

@KazzmanK commented on GitHub (Oct 31, 2022): Know nothing about macos, my install is on windows. Here are logs in Trace and Debug modes with DEV mode. [app.ini.txt](https://github.com/go-gitea/gitea/files/9898940/app.ini.txt) [trace.log](https://github.com/go-gitea/gitea/files/9898941/trace.log) [debug.log](https://github.com/go-gitea/gitea/files/9898942/debug.log) ini file is renamed to txt to make it attachable to github. So far workaround for initial migration to Gitea 1. Install 1.15.x version 2. Mass import your repositories via Unadopted 3. Upgrade to recent Gitea No workaround for existing installations
Author
Owner

@KazzmanK commented on GitHub (Oct 31, 2022):

I have finally got it adoped by using API, not UI.

And finally found a bug.

In HTML form behind YES button slash must be RIGHT (as on screenshot), but in recent versions under Win it is LEFT instead.
That is why it was working on your Mac and not on Win, I think.
More to say, I`ve found that in unadopted repositories list slash direction is also changed to "incorrect" after 1.15.11
fixing it to RIGHT in DevTools solves a problem.
image

@KazzmanK commented on GitHub (Oct 31, 2022): I have finally got it adoped by using API, not UI. And finally found a bug. In HTML form behind YES button slash must be RIGHT (as on screenshot), but in recent versions under Win it is LEFT instead. That is why it was working on your Mac and not on Win, I think. More to say, I`ve found that in unadopted repositories list slash direction is also changed to "incorrect" after 1.15.11 fixing it to RIGHT in DevTools solves a problem. ![image](https://user-images.githubusercontent.com/13328513/199093471-e4a25107-d8e6-4335-ad1b-eabd4db43d78.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9753