Cloning SVN repository for Git

millie picture millie · May 17, 2012 · Viewed 7.3k times · Source

I'm using SVN for source control which is hosted by a repository hosting company. I'm considering migrating this to Git and testing the waters of migration by trying to migrate to a local Git instance. I've installed Git Extensions v2.31 and installed the msysgit version that I was offered during the installation.

Once installed, I then clicked on the 'Clone SVN repository' option and entered in the SVN repo location and other necessary details. Clicked on the Clone button. I was then presented with the following message in the Process output window (I've desensitised some info):

c:\Program Files (x86)\Git\bin\git.exe svn clone "https://foobar.domain.com/folder/name.svn" "c:/git/"
Initialized empty Git repository in c:/git/.git/
Error validating server certificate for 'https://foobar.domain.com:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.domain.com
 - Valid: from Mar 18 13:23:06 2012 GMT until Apr 20 16:16:05 2013 GMT
 - Issuer: GeoTrust, Inc., US
 - Fingerprint: a2:36:f0:ae:8c:c7:a3:f2:be:98:b3:0f:2e:f8:3a:07:9a:94:90:81

At this point nothing else gets displayed, the progress bar is still indicating progress but nothing really happens. The issue seems similar to what is reported here: Git and SVN on Windows

However, I do not even get the option to reject/accept etc? Anyone got any ideas?

TIA

Answer

HotN picture HotN · Sep 26, 2012

You can still do this with Git Extensions. Open Git Bash from inside Git Extensions and run the command you saw it produce when using the GUI: git svn clone "https://foobar.domain.com/folder/name.svn" "c:/git/" This will provide you with the reject/accept temporarily/permanently options you see in the other SO question you linked to.

If you've already tried the "Clone SVN Repository" option and never saw success as described, your local repo is actually already set up, just not populated with any of the files yet. In this case, you no longer need to do a clone, just a fetch. Running git svn fetch on the project you tried to clone will also provide you with the reject/accept/etc options.