SVN to Git Sync does not work

I have been able to make sbugit configuration and install. I managed to trasfer big project from SVN to git with all of the history and commits. Now I’m facing problems with the sync. If I commit something to SVN I don’t get anything to git repo. Same thing vice versa.

This error I get from git side when I try to push change with tortoiseGit:

git.exe push --progress “origin” master:master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 12 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 378 bytes | 378.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Fetching revisions from SVN repository:
remote:
remote: SubGit ERROR REPORT (SubGit version 3.3.9 (‘Bobique’) build #4351):
remote:
remote: You’ve received this message because SubGit (http://subgit.com/) is installed in your repository
remote: and an error that needs to be dealt with has occurred in SubGit translation engine.
remote:
remote: TEMPORARY ERROR:
remote: Failed to push some refs to Subversion repository.
remote: svn: E175002: unknown host
remote: svn: E175002: OPTIONS request failed on ‘/svn/TestProject/TestProject1’
remote: test-lnx-02: Name or service not known
remote:
remote:
remote: CURRENT STATE:
remote: Both Git and Subversion repository are open for pushes or commits.
remote: Your commit was not committed, but you may retry it.
remote:
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall /srv/git/repo.git/.
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversion repositories
remote: will become open, but no synchronization will take place.
remote:
remote: TO REPORT:
remote: Report an issue at http://issues.tmatesoft.com/
remote: You may find logs on the server at ‘/srv/git/repo.git/./subgit/logs’
remote:
remote: THANK YOU!
To 192.168.xx.xx:/srv/git/repo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘git@192.168.xx.xx:/srv/git/repo.git’

git did not exit cleanly (exit code 1) (5953 ms @ 17.3.2020 10.27.32)

Any idea what could be wrong in my configuration?

I have configured JAVA_HOME and JRE_HOME to environment. passwd is configured. authors.txt is configured. shared in config is set to true.

Hi Lauri,

judging from the errors in the command output, SubGit is unable to resolve SVN server hostname:

remote: TEMPORARY ERROR:
remote: Failed to push some refs to Subversion repository.
remote: svn: E175002: unknown host
remote: svn: E175002: OPTIONS request failed on ‘/svn/TestProject/TestProject1’
remote: test-lnx-02: Name or service not known

It cannot send the pushed changes to SVN due to it and thus rejects the push. To resolve the issue make SubGit able to resolve the test-lnx-02 hostname.

Do You have any idea where my configuration went wrong? SubGit seems to be able to connect to SVN since it can import project from there? Any tips how to test/configure this?

if I have understood correctly url is set to config file what connects git to SVN. If someone can point me to right direction what to do. Some setting somewhere else than url in config file. Any help is much appriciated :)

yes, the URL is set in the SubGit configuration file in the particular repository. If SubGit performed the initial import well, it means that it was able to resolve the hostname at that time, but according to the error message, it is not now. The reason is not completely clear, something might be changed in the network, probably.
To diagnose the issue I’d recommend testing if the test-lnx-02 hostname is being resolved on the machine where SubGit is installed. It can be done by using nslookup command:

nslookup test-lnx-02

or try to ping it if dnsutils are not installed on the SubGit server.
If the test returns ‘host unknown’ result, it means that the hostname indeed cannot be resolved and thus DNS should be checked why.
If you know IP address of the test-lnx-02 machine, then as a workaround, the record for the test-lnx-02 may be added to ‘hosts’ file on the SubGit server. Or the SVN URL may be changed in the SubGit configuration file so that the SVN server is mentioned by IP, not by its name.