macos 升级到 Xcode 4.2 后,Organizer - SVN 存储库停止工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7203553/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 08:21:36  来源:igfitidea点击:

After upgraded to Xcode 4.2, Organizer - SVN repository stopped working

macossvnxcode4xcode-organizer

提问by Saran

I recently upgraded my Xcode to 4.2. Since then my Organizer-Repository stopped working. Initially it said "Host is unreachable" and placed red dot every where.

我最近将我的 Xcode 升级到 4.2。从那以后,我的 Organizer-Repository 停止工作。最初它说“主机无法访问”并在每个地方放置红点。

In the same Mac 10.6.8, i do have SvnX and it works with same SVN location without any problem. I also tested this in Safari and found it is working (Server supports VisualSVN). Only Xcode is finding problem with this location.

在同一个 Mac 10.6.8 中,我确实有 SvnX,它可以在相同的 SVN 位置正常工作,没有任何问题。我还在 Safari 中对此进行了测试,发现它可以正常工作(服务器支持 VisualSVN)。只有 Xcode 发现这个位置有问题。

I even appended my private/etc/host files with svn.ip.address my-svn-pet-name and used that in my xcode following this post. Doesn't work.

我什至在我的私有/etc/host 文件中附加了 svn.ip.address my-svn-pet-name 并在这篇文章之后在我的 xcode 中使用了它。不起作用。

My repository is connected over a specific port 8080. I gave ip-address in svn url as http://my-svn-pet-name:8080/...

我的存储库通过特定端口 8080 连接。我在 svn url 中将 ip-address 指定为http://my-svn-pet-name:8080/...

Any help is highly appreciated.

任何帮助都受到高度赞赏。

UPDATE: To isolate the issue, i tried to connect http://gdata-objectivec-client.googlecode.com/svn/trunk/from xcode organizer and it works without any problem. I didn't supply any user-name and password for this location. However, my repository requires authentication, in my recent tries when i select the short-cut on left pane, the dot-icon next to trunk, branches and tag glows green. However, when i click 'root' and tried to expand 'trunk' it says 'Unable to load revisions'

更新:为了隔离这个问题,我尝试从 xcode Organizer连接http://gdata-objectivec-client.googlecode.com/svn/trunk/并且它没有任何问题。我没有为此位置提供任何用户名和密码。但是,我的存储库需要身份验证,在我最近的尝试中,当我选择左窗格中的快捷方式时,树干、分支和标签旁边的点图标呈绿色亮起。但是,当我单击“root”并尝试展开“trunk”时,它显示“无法加载修订版”

UPDATE 9/9/11: Uninstalled xcode using command sudo /Developer/Library/uninstall-devtools --mode=all and Restarted the mac and Re-installed Xcode 4.2.

2011 年 9 月 9 日更新:使用命令 sudo /Developer/Library/uninstall-devtools --mode=all 卸载 xcode 并重新启动 mac 并重新安装 Xcode 4.2。

When i open Organizer, contrary to my expectation, all svn shortcuts are intact and the issue still persists.

当我打开 Organizer 时,出乎我的意料,所有 svn 快捷方式都完好无损,问题仍然存在。

采纳答案by ZeroDiv

The problems are only with the latest XCode 4 (build 4C177 — iOS 5 beta 7).

问题仅在于最新的 XCode 4(build 4C177 — iOS 5 beta 7)。

A slightly earlier version of XCode 4 (build 4C104 — iOS 5 beta 5) works fine.

稍早版本的 XCode 4 (build 4C104 — iOS 5 beta 5) 工作正常。

Like Saran, I tried the suggestions from majkelx and OMH and they did not work for me.

和 Saran 一样,我尝试了 majkelx 和 OMH 的建议,但它们对我不起作用。

When I launch build 4C177, and immediately open the Organizer, the repositories initially show green (as Saran noted) and histories are available. Any other operation turns them red. But the comparison view in the text editor successfullyshows diffs against the repository, with revision number.

当我启动 build 4C177 并立即打开 Organizer 时,存储库最初显示为绿色(如 Saran 所述)并且历史记录可用。任何其他操作都会使它们变红。但是文本编辑器中的比较视图成功地显示了与存储库的差异,以及修订号。

So, I conclude that the repositories are set up OK and authentication is actually working, but various source-control functionality in build 4C177 is buggy. I'd advise installing an earlier XCode 4 and waiting for the next release. I filed a bug report with Apple.

因此,我得出的结论是,存储库设置正常并且身份验证实际上可以正常工作,但是 build 4C177 中的各种源代码控制功能存在问题。我建议安装较早的 XCode 4 并等待下一个版本。我向 Apple 提交了错误报告。

回答by majkelx

  1. Close Xcode and all of Subversion clients
  2. Go to Keychain Access.app
  3. Search for all 'svn' entries.
  4. Delete all which can be related to your repository (assuming that you remember users and passes)
  5. Checkout project from the command line (Terminal.app) (to be sure, I use svn which goes with Xcode in the example below, may be You have installed another svn command line from macports or sth?)

    /Developer/usr/bin/svn co  http://my-svn-pet-name:8080/... tmp-dir
    
  6. Provide users and passes when svn asks for them.

  7. Go to Keychain Access.app again and for newly created entry (search for svn again) in details/Access Control, give access to password for all apps (this's not needed in 99% of cases but can fix issues with svn versions and other subversion clients mismatches).
  8. That's it. Xcode should see your repositories again, or after recreating shortcuts to them in Organiser.
  1. 关闭 Xcode 和所有 Subversion 客户端
  2. 转到钥匙串 Access.app
  3. 搜索所有“svn”条目。
  4. 删除所有可能与您的存储库相关的内容(假设您记住用户和通行证)
  5. 从命令行 (Terminal.app) 结帐项目(可以肯定的是,我在下面的示例中使用了与 Xcode 一起使用的 svn,可能是您从 macports 或 sth 安装了另一个 svn 命令行?)

    /Developer/usr/bin/svn co  http://my-svn-pet-name:8080/... tmp-dir
    
  6. 当 svn 要求时提供用户和通行证。

  7. 再次转到 Keychain Access.app 并在详细信息/访问控制中为新创建的条目(再次搜索 svn)授予对所有应用程序密码的访问权限(这在 99% 的情况下不需要,但可以解决 svn 版本和其他颠覆的问题客户不匹配)。
  8. 而已。Xcode 应该会再次看到您的存储库,或者在管理器中重新创建它们的快捷方式之后。

回答by underkuerbis

Tried everything, "Host is unreachable" all the way.

尝试了所有方法,“主机无法访问”。

The following fixed it instantly for ME (using a https connection(!)):

以下内容立即为我修复(使用 https 连接(!)):

  • Enter your repo address in Safari (only server address might work, as well).

  • When Safari warns you about trusting the server, "always accept" the certificate.

  • Restart Xcode. Done. Works.

  • 在 Safari 中输入您的存储库地址(只有服务器地址也可以)。

  • 当 Safari 警告您信任服务器时,“始终接受”证书。

  • 重新启动Xcode。完毕。作品。

回答by silversurfer

I have been having the same issues, starting with beta_7 (previous betas of 4.2 did not exhibit the issue). I upgraded to the GM of 4.2, and still the same.

我一直有同样的问题,从 beta_7 开始(之前的 4.2 测试版没有出现这个问题)。我升级到4.2的GM了,还是一样。

I discovered what was happening in my situation. The URL endpoints I've been used are SSL (https://my-svn/etc/etc). When I logged in via Safari to test, I was being presented with the "cert might not be valid" warning, then I continued past this and was able to enter my creds and could see the repository structure (as expected).

我发现了我的情况。我使用过的 URL 端点是 SSL (https://my-svn/etc/etc)。当我通过 Safari 登录进行测试时,我看到了“证书可能无效”警告,然后我继续通过这个警告并能够输入我的凭据并可以看到存储库结构(如预期的那样)。

I initially thought that the cert being used on the server had expired, and Xcode was honoring the warning behind the scenes. Next time I tried with Safari, I chose the "View Certificate" in the warning, and saw that the cert was still fresh (2018 expiration date), but that our self-signed cert was not pointing to a Certificate Authority, and Safari was reporting that my Mac did not trust that cert. So, I chose the "Always trust" options that are presented by the dialog, and the warnings went away in Safari. The "forced trust" is established in the Mac's Keychain, so then I launched Xcode and viola, all of the associated repository entries in Organizer glowed green.

我最初认为服务器上使用的证书已过期,Xcode 正在执行幕后警告。下次我尝试使用 Safari 时,我在警告中选择了“查看证书”,看到证书仍然是新鲜的(2018 年到期日期),但是我们的自签名证书没有指向证书颁发机构,而 Safari 是报告我的 Mac 不信任该证书。因此,我选择了对话框显示的“始终信任”选项,Safari 中的警告消失了。“强制信任”是在 Mac 的 Keychain 中建立的,所以我启动了 Xcode 和 viola,Organizer 中所有相关的存储库条目都发出绿光。

回答by Peter Depuydt

I had the same problem using VisualSVN.

我在使用 VisualSVN 时遇到了同样的问题。

I could connect to is over HTTPS://mysvnserver:8443/where I then was requested for a user/pass combo.

我可以连接到HTTPS://mysvnserver:8443/我然后被要求提供用户/通行证组合的地方。

In Xcode the connection always failed. Sometimes Xcode would complain about the certificate not being issued by a trusted authority, which in my case would be correct.

在 Xcode 中,连接总是失败。有时 Xcode 会抱怨证书不是由受信任的机构颁发的,这在我的情况下是正确的。

The certificate is in my keychain as always trust but that didn't solve the issue.

该证书在我的钥匙串中一如既往地信任,但这并没有解决问题。

My solution:

我的解决方案:

  1. open an terminal window
  2. type command svn co https://mysvnserver:8443
  3. A request is issued for the certificate security press P to allow permanent.
  1. 打开终端窗口
  2. 输入命令 svn co https://mysvnserver:8443
  3. 发出请求证书安全按 P 允许永久。

回答by Simon

Xcode 4.2's SVN is well and truly broken.

Xcode 4.2 的 SVN 真的很糟糕。

svn from the command line works just fine, so I don't see how it can be an authentication issue -- it's just a straight bug and a demonstration of how much testing Xcode releases receive these days... The Xcode 4 series has been a lot of backwards :-(

来自命令行的 svn 工作得很好,所以我看不出它是如何成为身份验证问题的——这只是一个直接的错误,并展示了这些天收到多少测试 Xcode 版本...... Xcode 4 系列已经很多倒退:-(

SVN in Xcode 4.1 was almostworking properly.... And now it doesn't work at all. Whee!

Xcode 4.1 中的 SVN几乎可以正常工作......现在它根本无法工作。呼!

回答by kanna

When you use any IP to access SVN, XCode sends local user's credentials and SVN cannot authorize user;

当您使用任何IP访问SVN时,XCode发送本地用户的凭据,SVN无法对用户进行授权;

You just need to create an alias for your IP in hosts and use that alias in URL instead of IP. A comprehensive manual of how to make aliases you can find here. At the end my URL looked like http://svnserver:8080/svn/....

您只需要在主机中为您的 IP 创建一个别名,并在 URL 中使用该别名而不是 IP。您可以在此处找到有关如何制作别名的综合手册。最后我的 URL 看起来像http://svnserver:8080/svn/....

回答by baja_yu

Had the same problem. The dots are green in the list of repositories but it just refuses to commit changes or update status, though compare works fine.

有同样的问题。存储库列表中的点是绿色的,但它只是拒绝提交更改或更新状态,尽管比较工作正常。

I opened Repositories, then on the left pane selected the project under the repository item. In the bottom-left of the window you'll have two buttons, Update and Commit. I pressed Commit there and it worked fine. However, after that it still wouldn't commit through the project (Alt+Cmd+C or through File menu). Not sure exactly what's going on.

我打开了存储库,然后在左侧窗格中选择了存储库项下的项目。在窗口的左下角,您将有两个按钮,更新和提交。我在那里按下 Commit ,它工作正常。但是,之后它仍然不会通过项目(Alt+Cmd+C 或通过文件菜单)提交。不确定到底发生了什么。

回答by JD C4M

Try remove the "https://login@"from your svn address Works for me.

尝试从您的 svn 地址中删除“https://login@”对我有用。

for http://my-svn-pet-name:8080/try something like my-svn-pet-name:8080/

对于http://my-svn-pet-name:8080/尝试类似my-svn-pet-name:8080/

回答by OMH

After upgrading to Xcode 4.2, I had the same problems, red dots, and "host unreachable".

升级到 Xcode 4.2 后,我遇到了同样的问题,红点和“主机无法访问”。

I tried the recipe from majkelx, but those dots where still red.

我尝试了 majkelx 的食谱,但那些点仍然是红色的。

But then I just tried to check out the repository with the Xcode organizer instead of the command line. And suddenly it all worked!

但后来我只是尝试使用 Xcode 管理器而不是命令行来查看存储库。突然间,这一切都奏效了!

(It may not have worked without fiddling with the Keychain, like majkelx described)

(如果不摆弄钥匙串,它可能无法工作,就像 majkelx 描述的那样)

EDIT: When searching for Subversion entries in keychain, also seach for "sub", not just "svn". My passwords where in "subversion". Only my web subversion password was in "svn". Just one more hint for others who are struggling with this. I wasted more than an hour on this today. :-)

编辑:在钥匙串中搜索 Subversion 条目时,还要搜索“sub”,而不仅仅是“svn”。我的密码在“颠覆”中。只有我的网络颠覆密码在“svn”中。对于正在为此苦苦挣扎的其他人来说,这只是一个提示。我今天浪费了一个多小时。:-)