Xcode 4 SVN 挂在“签出”处如果需要客户端证书
我正在尝试让 Xcode 4 与我的 svn 存储库一起工作。我输入 svn 地址,它说可以访问,但是当我尝试查看时,它显示“服务器‘svn.testbedapp.com’需要客户端证书”。 (它不提供提供证书的选项),然后它会用旋转轮无限期地显示“正在签出'ProjectName'”。
我有什么想法如何提供证书或让它检查任何内容吗?
I am trying to get Xcode 4 working with my svn repository. I type in the svn address, which it says is reachable, but when I try to check out, it comes up with "The server 'svn.testbedapp.com' requires a client certificate." (it doesn't provide the option to supply the certificate) and then it shows "Checking out 'ProjectName'" indefinitely with s pinning wheel.
Any ideas how I supply the certificate or get it checking anything out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个已知问题。
打开终端,输入
svn ls <您的存储库地址>
确认证书,检查登录/密码。
之后,repo 将在 xcode 中正常工作。
It's a known issue.
Open terminal, type
svn ls <your repository address>
confirm certificates, check login/pass.
After that repo will work fine in xcode.
您可以将证书文件名放入 SVN 配置文件中,
在 [global] 部分中只需添加一行(使用完整路径 - 非相对路径)
或者您也可以添加
You can put your certificate file name to SVN configuration file
In section [global] just add a line (use a full path - not relative)
Optionally you can add also
回答原来的问题:
服务器“foo.example.com”需要客户端证书。
翻译:Xcode 在您的钥匙串中找不到 SSL 客户端证书,证书无效,或者如果有多个证书,Xcode 不知道使用哪一个。
要安装钥匙串中的证书:在 Finder 中,打开包含客户端证书的文件(通常是 .p12 文件)。单击“添加”,然后输入密码以解密 .p12 文件。如果您有相应的根证书(通常是 .pem 文件),也请将其导入并在出现提示时单击“始终信任”。
要确保证书有效:在“钥匙串访问”中,选择客户端证书并查找绿色复选标记和“此证书有效”字样。
安装相应的根证书。
要将 URL 与特定证书关联:您需要身份首选项。 Xcode 无法做到这一点,但 Keychain Access 和 Safari 都可以。在“钥匙串访问”中,选择客户端证书并选择“文件”菜单 > “钥匙串访问”。新的身份偏好……输入存储库 URL(例如
https://foo.example.com/path/to/repository
)并单击“添加”。或者:在 Safari 中,转到您的存储库 URL。如果安装了多个证书,Safari 会提示“网站“foo.example.com”需要客户端证书”并显示证书列表。选择您在步骤 (1) 中安装的那个。
为了让一切正常工作,您还需要克服这两个常见错误:
客户端证书文件名:身份验证领域:
https://foo.example.com:443
翻译:Subversion 不能在磁盘上找到您的 SSL 客户端证书。
Xcode 使用 Keychain,Subversion 本身(从 v1.4 开始)也使用 Keychain 作为密码。然而,对于证书,Subversion 必须指向磁盘上的文件。
1)在您喜欢的文本编辑器中打开
~/.subversion/servers
。在底部添加一行,其中的值是 PKCS#12 格式的客户端证书的路径。
svn:“
https://foo.example.com/path/to/repository
”的选项:SSL 握手失败,请求客户端证书:SSL 错误:sslv3 警报握手失败翻译: Subversion 找不到用于解密您的 SSL 客户端证书的密码。
请参阅上面的说明。
要将 .p12 密码保存在钥匙串中:在终端中,键入
此时,您应该看到存储库的内容显示在终端中。
注意:如果您使用 Black Pixel 版本,则至少 v1.2.2 似乎在使用 Keychain 作为密码时遇到问题,因此在
~/.subversion/servers
中,您还需要添加以下行:密码是明文的。 (这显然不安全,所以除非必要,否则不要这样做。)
To answer the original question:
The server “foo.example.com” requires a client certificate.
Translation: Xcode can't find the SSL client certificate in your keychain, the certificate is not valid, or if there's multiple certificates, Xcode doesn't know which one to use.
To install a certificate in your keychain: In Finder, open the file that contains your client certificate (typically a .p12 file). Click Add, then enter the password to decrypt the .p12 file. If you have the corresponding root certificate (typically a .pem file), import it as well and click "Always Trust" when prompted.
To make sure the certificate is valid: In Keychain Access, select the client certificate and look for a green checkmark and the words "This certificate is valid".
install a corresponding root certificate.
To associate the URL with a specific certificate: You need an identity preference. Xcode can't do this, but both Keychain Access and Safari can. In Keychain Access, select the client certificate and choose File menu > New Identity Preference…. Enter the repository URL (e.g.
https://foo.example.com/path/to/repository
) and click Add.Alternatively: In Safari, go to your repository URL. If there are multiple certificates installed, Safari will prompt "The website “foo.example.com” requires a client certificate" and show a list of certificates. Choose the one you installed in step (1).
To get everything working, you also need to get past these two common errors:
Client certificate filename: Authentication realm:
https://foo.example.com:443
Translation: Subversion can't find your SSL client certificate on disk.
Xcode uses Keychain, and Subversion itself (as of v1.4) uses Keychain as well for passwords. For certificates, however, Subversion must be pointed to files on disk.
1) Open
~/.subversion/servers
in your favorite text editor. At the bottom, add the linewhere the value is the path to your client certificate in PKCS#12 format.
svn: OPTIONS of '
https://foo.example.com/path/to/repository
': SSL handshake failed, client certificate was requested: SSL error: sslv3 alert handshake failureTranslation: Subversion can't find the password to decrypt your SSL client certificate.
See explanation above.
To save your .p12 password in Keychain: In Terminal, type
At this point, you should see the contents of your repository displayed in Terminal.
Note: If you use Versions by Black Pixel, at least v1.2.2 seems to have trouble using Keychain for passwords, so in
~/.subversion/servers
you'll also need to add the linewhere your password is in cleartext. (This is obviously not secure, so don't do it unless you have to.)