In the past I’ve used to have gzipped git bundle files for backup. I’ve also used them importing into SCM-Manager. This seems to be somehow broken. When I’m trying to import a plain git bundle file without compression, I’ve got the following error:
Import of repository git/smos
Repository type: git
Imported from: DUMP
Imported by chef (chef)
2023-04-04T13:13:13.773241500Z - import started
2023-04-04T13:13:13.786241200Z - writing temporary dump file
2023-04-04T13:13:13.787240400Z - importing repository data from dump file
2023-04-04T13:13:13.841238900Z - import failed (see next log entry)
Error detected parsing the header
2023-04-04T13:13:13.989242700Z - import failed (see next log entry)
Failed to import from bundle
Anything I’m doing wrong? The bundle was created on Windows on a fresh cloned repository using the following statement:
cd < CLONED REPO DIRECTORY >
git bundle create ./…/smos.bundle --all
SCM-Manager is running in Version 2.42.3 on Windows, too.
could you provide the full stacktrace? Which is the exact reason your bundle header could not be parsed.
I assume you double checked your import config? It should be Git, uncompressed, no password
please find attached some screenshots. I’m not sure about the stack trace. I did the following:
- Shutdown the SCM-Manager on my testmachine
- Removed all files in the log directory
- Installed and startup the SCM-Manager
- Login and do the import as usual
- Logoff and shutdown
- Zip log directory
Hope this helps.
PS: If it will help, I can install also the support plugin.
I reproduced your case and found this during the import:
Caused by: java.lang.IllegalArgumentException: Invalid byte 100 at offset 0 in 'd71ff953' len=8
Not sure what this is about but we will try to find a solution.
Okay, our docs say that we don’t support git bundles yet. Our export format matches the expected import format.
The output format of the repository can be changed via the offered options:
Standard: If no options are selected, the repository will be exported in the standard format. Git and Mercurial are exported as Tar archive and Subversion uses the Dump format.
Can you import the repository without git bundles? I think you can simply
tar your bare repository. Feel free to export an example repository and check the expected format.
Oh, okay, didn’t know this. I’ve developed backup scripts based on git bundle. Tested during development also the import to SCM-Manager. The backup and also the restore worked very well. Haven’t tested the restore since last year.
Thanks for your suggestions. I’ve tried the following cases:
- git clone --mirror, tar it => No success
- git clone --bare, tar it => No success
The message “Failed to import from bundle” makes me believing that a git bundle seems to be the right way, but I may be wrong.
I’ve installed the “Repository Mirror Plugin” and cloned a git repo from GitHub and exported it without metadata but zipped.
Then I was successful in importing this export. The result of unzipping/untaring the export confuses me - the result is readable, but at least for me an unknown format. Is there any kind of format description available?
Unfortunately in this case the code is our documentation.
If you are interested here some pointers for research:
- The export gets called here
- The bundle logic for git is here
- The tar writer is that
thank you for your support. I’ve tested an export created by the SCM-Manager - this one can be imported by the system without any problems.