What steps will reproduce the problem:
1. I have manually copied my local .git repo (2.5Gb) to Gitblit git folder
2. Gitblit was restarted
3. During Gitblit startup exception is thrown, Gitblit exits
4. If added repo is removed, Gitblit is started normally
This is a part of gitblit startup log:
INFO Gitblit base folder = C:\incoming\gitblit-1.2.1\data
INFO Git repositories folder = C:\incoming\gitblit-1.2.1\data\git
INFO Gitblit settings = C:\incoming\gitblit-1.2.1\data\gitblit.properties
INFO Identifying available repositories...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index
out of range: 0
Reported by micheal.zub on 2013-06-18 19:07:46
The text was updated successfully, but these errors were encountered:
Thanks for the report, but this is not a bug. You can't put a ".git" folder into the
1. rename ".git" to somerepo.git
2. copy the entire working tree to a folder within the repositories folder
3. clone the source repo into the repositories folder
Hello, thanks for the answer, but is seems another type of issue than you mention. I
have tried both separately:
1. Renamed my .git folder to test.git folder
2. Created new folder under repositories folder and copied my .git folder contents
The exception was still thrown. So could it be another limitations for repo contents
that I should check?
Hmmm. I pushed a fix for the IOOB exception in stringutils... but this won't help you.
Gitblit thinks there is no relative path relationship between your repositories folder
and your repo.
How about cloning a mirror into your repositories folder instead of messing with dir
copying? Anything else different about your win filesystem? Are you using symlinks?
Okay, I have finally resolved my issue under next workflow:
1. Copy my repo .git folder to gitblit\data\git
2. Rename .git folder to repo.git
3. Start Gitblit, the exception is thrown on startup, Gitblit exits
4. Open the shell in repo.git and execute command: git config --bool core.bare true
5. Start the Gitblit, everything works fine, repos are fully accessible
Seems Gitblit differs bare and non-bare repos and my bare repo was marked as non-bare.
Gitblit can work with both bare and non-bare repositories, but Gitblit depends on JGit
which must have been confused by your "half-bare" repo. I'm glad you figured it out
and we both learned something new.