简体   繁体   中英

running svn on cygwin with SYSTEM account: SSL handshake failed: SSL error code -1/1/336032856

I have the following problem under windows server 2008 R2 enterprise, running through cygwin the following code monitored by Jenkins:

svn co --trust-server-cert --non-interactive --username=xxx --password=xxxx https://xxx/testprojects C:/source/testprojects

That results in the following error message in Jenkins log:

svn: E175002: Unable to connect to a repository at URL 'https://xxx/testprojects'
svn: E175002: OPTIONS of 'https://xxx/testprojects': SSL handshake failed: SSL error code -1/1/336032856 (https://xxx)

Jenkins is running under the SYSTEM acount. I have tried del %APPDATA%/Subversion/auth , the result is the same. Also removing the --trust-server-cert gave no changes.

Precodintions: windows server 2008 RE2 (windows 7), cygwin 1.7.9(0.237/5/3), Jenkins as service (no idea how to check the version at the moment) Reproduction Steps:

  1. Open cmd as admin
  2. Gain System acount using the PsExec.exe -i -s -d CMD
  3. In the SYSTEM cmd call cygwin --login
  4. try to svn checkout into some directory
  5. observe the SSL handshake failed: SSL error

Try changing the "xxx" in https://xxx/testprojects from DNS to IP or vice versa (see https://stackoverflow.com/a/8351174/1996150 ).

This solved the same error (in a different environment, svn version 1.7.10) for me.

In my case the problem appeared only in svn (browser and openssl opened the https url, but svn returned the error), so I think it was a mix of svn issue and server certificate recognition.

If this do not solve the problem it may be a different one, but you can test SSL connection with

openssl s_client -connect xxx:443 

Note: in my case I also tried to delete the current server certificate into ~/.subversion/auth/svn.ssl.server but didn't work...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM