SVN command line in jenkins fails due to server certificate mismatch

前端 未结 8 1335
长情又很酷
长情又很酷 2021-02-07 12:53

When I run the svn command line from the Jenkins shell I get this error:

 D:\\Jenkins\\jobs\\Merge Trunk to Stable\\workspace\\stable>svn up --trust-server-ce         


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 13:03

    Pretty old question, but still quite alive.

    As you know, the problem is that the accepted certificate cache (as well as the username/password cache) is per-user, and since Jenkins is running as a different user (most likely SYSTEM), it has no idea of your regular user cache.

    Not all SVN clients let you do the "echo p" thing there (it didn't work for me), and the --trust-server-cert apparently doesn't work in this case either.

    What worked for me was to open a console window as SYSTEM, and do the interactive acceptcertificate-login-password dance in there.

    Since all of this is cached, you only need to do this once, and from then on, all svn up and similar requests will work.

提交回复
热议问题