Hangs on "Error validating server certificate" #51

Closed
drestuart opened this Issue Feb 6, 2012 · 24 comments

Projects

None yet

I'm trying to check out from my repo, and svn2git is hanging on this error:

"Error validating server certificate for 'https://www.my.server.org:443':

  • The certificate is not issued..." etc.

This message is only printed if I run with the -v flag; without, I get nothing. In either case, svn2git sits doing nothing (as far as I can tell) and not giving me any feedback. This should cause svn2git to either quit, or print a reassuring message about how it's forging ahead.

Owner
nirvdrum commented Feb 6, 2012

Can you check what git-svn does here? We just wrap up git-svn, ultimately, and I'm guessing that's what's blocking for input.

Ah, good point.

Here's what git-svn does.

  1. Initialize:

$ git svn init https://www.my.server.org/path/to/repo

  1. Fetch:

$ git svn fetch

This prints the same message I mentioned before, with a security certificate fingerprint and all, and then an additional line that svn2git doesn't show:

"(R)eject, accept (t)emporarily or accept (p)ermanently?"

When I enter an option it proceeds to check out normally. So svn2git seems to be waiting on git-svn, which is waiting on me for input, but I'm not seeing the message.

Entering "t" at this point in svn2git doesn't help either, so it seems that svn2git isn't relaying the input back to git-svn either.

-----Original Message-----
From: Kevin Menard [mailto:reply@reply.github.com]
Sent: Monday, February 06, 2012 1:03 PM
To: Stuart, Daniel
Subject: Re: [svn2git] Hangs on "Error validating server certificate" (#51)

Can you check what git-svn does here? We just wrap up git-svn, ultimately, and I'm guessing that's what's blocking for input.


Reply to this email directly or view it on GitHub:
#51 (comment)


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

hisham commented Feb 10, 2012

+1 I get this issue too

hisham commented Feb 10, 2012

Accepting it permanently fixes the issue for svn2git

Hisham: Can you give more info on your workaround? Here's what I'm trying:

$ git svn clone https://myrepo
[Accept certificate (p)ermanently when prompted]
[wait for project to download]

$ svn2git -v https://myrepo

And svn2git still waits for my input, whether I'm in the same directory or not. I'm on Windows XP, if that's at all relevant.

hisham commented Feb 10, 2012

For some reason on my computer once I answer the question once it doesn't ask me again. Maybe because I do the command in the same directory. I'm running Mac OSX.

svn2git eventually does fail for me though, but on an unrelated error:

Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
fatal: refs/remotes/svn/trunk: not a valid SHA1
update-ref refs/heads/master refs/remotes/svn/trunk: command returned error: 128
command failed:
2>&1 git svn fetch

Interesting. I'll try it out on my Mac and post an update.

Confirmed, that workaround works for me too on OS X.

Owner

I'm not sure there's a great fix for this other than detecting the prompt and passing through STDIN. If anyone knows of an argument to git that would skip certificate verification, that would be great.

Running into this issue migrating a Codeplex project to host on github
The following might help regarding skipping cert verification:
http://stackoverflow.com/questions/11621768/git-ignore-a-self-signed-certificate

aadrian commented Oct 29, 2012

@LloydPickering

The following might help regarding skipping cert verification:....
Unfortunately this still doesn't make svn2git to work :(.

IMO this issue is a blocker, since most "company intranet" SVN repositories are self signed, thus svn2git won't work for the majority of real use cases :(.

I was able to get past this by running with the -v flag and entering "t" a couple of times. Not ideal, though.

This workaround worked for me: Use the --verbose flag. When it stops, press 'p' for permanently accept, then Enter. Type your password, then Enter.

@lornemcintosh solution works for me

I'm a complete svn2git/git rookie, but I'll just add that I got that same error even with a valid, CA-signed (wildcard) certificate.

lornemcintosh's workaround worked for me.

The real problem is that it doesn't write what it is waiting for until after you have made your choice.

Owner

It took a bit of effort, but svn2git should pass STDIN in through to the underlying git-svn process as of the 2.3.0 release. This should allow you to respond to the prompt and accept or reject the certificate. Please re-open if you find otherwise.

@nirvdrum nirvdrum closed this May 14, 2014

This issue appears to still exist in svn2git-2.3.2

Owner

@Burstaholic What locale are you using?

LANG=en_US.UTF-8

Is that what you need?

saily commented Jun 18, 2015

drestuart's workaround works.

Issue still exists. Just keep entering the choice (t or p followed by Enter) over and over till it starts doing something.

Owner

I can try to fix this again, but git-svn certainly doesn't make it easy :-/

I wouldn't bother, the workaround is cromulent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment