Tom*_*ter 7 linux permissions https svn certificate-authority
错误
Error validating server certificate for 'https://server:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- The certificate hostname does not match.
Certificate information:
- Hostname: Tom
- Valid: from Sun, 01 Feb 2009 03:51:25 GMT until Tue, 01 Feb 2011 03:51:25 GMT
- Issuer: Fake Company, NYC, New York, US
- Fingerprint: fingerprint here
(R)eject, accept (t)emporarily or accept (p)ermanently?
svn: OPTIONS of 'https://server/svn/repo': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://server)
Run Code Online (Sandbox Code Playgroud)
我知道这一切。这就是为什么我按照所有指南让 svn 自动接受证书:
/root/.subversion/servers
[global]
ssl-authority-files = /root/scripts/server.crt
Run Code Online (Sandbox Code Playgroud)
/root/scripts/server.crt
-----BEGIN CERTIFICATE-----
MIIDejCCAmICCQDibo0twimetjANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJV
UzERMA8GA1UECBMITmV3IFlvcmsxDDAKBgNVBAcTA05ZQzEjMCEGA1UEChMaSGFw
et al
-----END CERTIFICATE-----
Run Code Online (Sandbox Code Playgroud)
/root/scripts/backup.sh
svn up /BACKUP/checkouts/server/ --username tom
Run Code Online (Sandbox Code Playgroud)
并且该命令以 root 身份运行良好(没有 sudo,直接以 root 身份运行),没有提示确认证书(以前有,但我选择 p 永久接受)。
有谁知道为什么我的脚本不起作用?在过去的几个月里,这一直困扰着我。
**编辑:**我花了一些时间才回到这一点,我遵循了大卫的建议,但它仍然不起作用。现在错误是:
Error validating server certificate for 'https://server:443':
- The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually!
Certificate information:
- Hostname: server
- Valid: from Sat, 20 Jun 2009 14:10:45 GMT until Mon, 20 Jun 2011 14:10:45 GMT
- Issuer: Fake Company, New York, US
- Fingerprint: 1a:c6:9c:eb:62:9e:e1:05:d9:d3:ac:01:f4:35:dc:00:14:48:e5:39
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: OPTIONS of 'https://server/svn/folder': Server certificate verification failed: issuer is not trusted (https://server)
Run Code Online (Sandbox Code Playgroud)
验证“https:// server :443”的服务器证书时出错: - 证书不是由受信任的机构颁发的。使用 指纹手动验证证书! - 证书主机名不匹配。 证书信息: - 主机名:汤姆 - 有效期:从 2009 年 2 月 1 日星期日 03:51:25 GMT 到 2011 年 2 月 1 日星期二 03:51:25 GMT - 发行人:Fake Company,纽约,纽约,美国 - 指纹:指纹在这里
问题是您的证书与服务器的主机名不匹配。您需要证书中的 CN 字段来匹配您的主机名。在你的情况下,你的主机名是“server”,你的证书的 CN 是“Tom”。您需要使用正确的 CN 值重新生成证书。
有几种解决方案可以解决我想到的问题。首先,您可以在 Apache 中创建一个不使用此证书(纯 http)的新 webdav 虚拟主机。或者,您可以使用 svn+ssh 访问方法和私钥身份验证来执行 cron 作业(可能存在安全风险)。
如果您无法解决证书问题,或者没有绑定到 https webdav 访问,我只会采用这条路线。