在 XCode 中使用 SVN
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3951692/
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
Using SVN in XCode
提问by Alan
I am sure this is something stupid, but it has me flummoxed. I have setup SVN to connect to codespaces.com and from the SCM area of xcode, I check it out and it seems to work beautifully.
我确信这是愚蠢的事情,但它让我感到困惑。我已将 SVN 设置为连接到 codespaces.com 并从 xcode 的 SCM 区域进行检查,它似乎运行良好。
then I go into xcode and on the status line I get
然后我进入 xcode 并在状态行上得到
Error 170001 (Authorization failed) Description: OPTIONS of 'https://[email protected]/smilingsoftware/iDirectory/trunk/Directory/Directory.xcodeproj': authorization failed: Could not authenticate to server: rejected Basic challenge (http://svn.codespaces.com)
错误 170001(授权失败)描述:“https://[email protected]/smilingsoftware/iDirectory/trunk/Directory/Directory.xcodeproj”的选项:授权失败:无法向服务器进行身份验证:拒绝基本质询(http ://svn.codespaces.com)
I have googled this like crazy and all I get are people complaining on mailing lists of similar problems (different providers) and no answers.
我疯狂地搜索了这个,我得到的只是人们在类似问题(不同提供商)的邮件列表中抱怨,但没有答案。
Can anyone suggest something to protect what little hair I have remaining???
任何人都可以建议一些东西来保护我剩下的那几根头发???
Thanks in advance,
提前致谢,
Alan
艾伦
回答by Stanislav Dvoychenko
There might be few reasons for this I guess. Although just recently I ran across the same problem myself after upgrade to Xcode 4. I'm not sure if during the upgrade svn version was updated as well (I see 1.6.5 now). But anyway it was obvious that xcode is not sending correct credentials anymore.
我想这可能有几个原因。虽然最近我在升级到 Xcode 4 后遇到了同样的问题。我不确定在升级期间 svn 版本是否也更新了(我现在看到 1.6.5)。但无论如何,很明显 xcode 不再发送正确的凭据。
I believe you should try to use svn itself to remedy the situation and "re-cache" the credentials.
我相信您应该尝试使用 svn 本身来纠正这种情况并“重新缓存”凭据。
Change to your working folder in terminal. Run svn st to see if you have changes. Then use svn commit -m "checkin comment" and if you have the same problem I had, you'll see first auth attempt with your "local" login name. If there is no such account on svn, it will offer you to enter login name and password for svn now.
在终端中切换到您的工作文件夹。运行 svn st 以查看是否有更改。然后使用 svn commit -m "checkin comment" ,如果您遇到与我相同的问题,您将看到第一次使用“本地”登录名进行身份验证的尝试。如果 svn 上没有这样的帐户,它会提供您现在输入 svn 的登录名和密码。
After that, it started to work in xcode as well.
之后,它也开始在 xcode 中工作。
I published a bit more of detail on my blog.
回答by Stas
Ok, I've got the same error and solved the problem successfully. My SVN server is on the local network, but I think solution will work for codespaces.com either.
好的,我遇到了同样的错误并成功解决了问题。我的 SVN 服务器在本地网络上,但我认为解决方案也适用于 codespaces.com。
First of all, open your repo in XCode, but leave the fields for trunk, branches and tags empty.
Clean out your repo.
Then, create temporary localfolder with subfolders 'trunk', 'branches' and 'tags' inside.
Place all your project files inside 'trunk' folder.
Go to XCode import all three folders into Root one by one.
If you did all right, you'll have three folders in root. Go to your repo settings and write the paths for you trunk, branches and tags. I suggest you will write just 'trunk', 'branches' and 'tags'. Indicators must become green.
首先,在 XCode 中打开您的存储库,但将主干、分支和标签字段留空。
清理你的回购。
然后,创建临时本地文件夹,其中包含子文件夹 'trunk'、'branches' 和 'tags'。
将所有项目文件放在“trunk”文件夹中。
去 XCode 将所有三个文件夹一一导入到 Root 中。
如果一切顺利,您将在根目录下拥有三个文件夹。转到您的 repo 设置并为您的主干、分支和标签编写路径。我建议你只写 'trunk'、'branches' 和 'tags'。指标必须变为绿色。
That's all, you can work with you project, check out, commit, make branches etc.
就是这样,您可以处理您的项目、签出、提交、创建分支等。