Closed jcolomb closed 3 years ago
NB: testbot is not a site admin, just a normal user, is that the problem?
just seen the terminal was also giving some log, it gets a different error first:
load pubkey "/root/.config/g-node/gin/gin.key": invalid format
Cloning template repository G-node/template_parent Creating testtonic/testproject_n4 Repository created: testtonic/testproject_n4 Preparing to push template to new project (adding remote): ssh://git@gindata.biologie.hu-berlin.de:10022/testtonic/testproject_n4 Added new remote: newproject [ssh://git@gindata.biologie.hu-berlin.de:10022/testtonic/testproject_n4] Cloning submodules Creating testtonic/testproject_n4.05_figures/990_shared_figures Failed to create repository: json: cannot unmarshal array into Go value of type map[string]interface {}
This is very strange because the line it failed on:
Creating testtonic/testproject_n4.05_figures/990_shared_figures Failed to create repository: json: cannot unmarshal array into Go value of type map[string]interface {}
Is the same code as the first repo creation that worked
Creating testtonic/testproject_n4 Repository created: testtonic/testproject_n4
Oh wait, I see the issue.
It tried to create a repository called testtonic/testproject_n4.05_figures/990_shared_figures
. This isn't valid.
This is a bug. It assumes that submodules are in the root of the repository, so it uses the path of the submodule to name the new repository for it, which if it's nested, will have a /
and wont be a valid repository path on the server.
I'll fix this.
Can you post the contents of the .gitmodules
file for this repository?
Since this is just for the labproject service, how would you like this to work?
The repository name for the submodule is created by appending the name of the original (template) submodule to the name of the new project. In this case where the name of the submodule contains a /
, I can think of two ways to do it:
testproject_n4.05_figures_990_shared_figures
: Replace the /
with a _
.testproject_n4.990_shared_figures
: Use only the last path component of the submodule name/path.The first would be more robust. The second one could cause conflicts if there are two submodules with the same basename but in different subdirectories. I realise that with the template naming scheme this shouldn't happen, but technically it could.
Let's go with the first one then.
.gitmodule of the template: https://gindata.biologie.hu-berlin.de/G-Node/template_parent/src/master/.gitmodules no one is created for testproject_n4
trying to use tonic with https://gindata.biologie.hu-berlin.de/G-Node/template_parent
json:
log: