Basic registration question


For a few years now we have been using subgit to manage a 2-way mirror between a local SVN repository and GitLab. I’m setting up the mirroring again now, and I am having trouble registering the subgit key. The documentation indicates that it requires root privileges. I do not have these privileges (cannot use sudo). However, we have previously registered the key successfully, and I have found during recent experimentation that occasionally (unpredictably) the registration succeeds despite lacking super user privileges (I don’t understand why, but it did happen!) I now want to set up the final mirroring configuration, but I am unable to register the key. Can you help?


Hi James,

it’s possible to register a repository without root permissions yet it requires the SubGit registering directory to be redefined. It can be done either in the following way:

$ JAVA_OPTS="-Dsubgit.systemPath=$HOME/.subgit" subgit register --key subgit.key REPOS_PATH

or it’s also possible to adjust the subgit executable script, so that it always uses $HOME/.subgit as system path and hence there’s no need to add JAVA_OPTS every time you register a key:

$ edit SUBGIT_INSTALL_DIR/bin/subgit
EXTRA_JVM_ARGUMENTS=" -Djava.awt.headless=true -Djna.nosys=true -Dsvnkit.http.methods=Digest,Basic,NTLM,Negotiate -Dsubgit.systemPath=$HOME/.subgit"
$ subgit register --key subgit.key REPOS_PATH

Hi Ildar,

Thanks for the swift response!

It seems that my SUBGIT_INSTALL_DIR/bin/subgit already contains the same EXTRA_JVM_ARGUMENTS that you suggest.

However, you inspired me to look inside my ~/.subgit/ directory and I found a couple of .lock files in the v1/ subdirectory. After I renamed those, the registration worked.

Thanks so much for your prompt help!