Xcode 5:无法访问存储库 [英] Xcode 5: The repository could not be reached

查看:61
本文介绍了Xcode 5:无法访问存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode 5上遇到此问题,我正在尝试将文件提交到远程git存储库(BitBucket),并弹出带有以下错误的窗口:无法访问存储库" project_name.请验证存储库是否在线且可访问,然后重试."

I have this issue with Xcode 5 where I'm trying to commit a file to a remote git repository (BitBucket) and getting a pop up window with the following error: "The repository "project_name" could not be reached. Please verify that the repository is online and reachable and try again."

我已经使用了一段时间(从Xcode 4开始),并且没有任何问题.在Xcode-> Preferences-> Accounts-> Repositories下,我看到了正确的存储库,但是重复了.我删除并再次添加了它,但没有帮助.我尝试关闭项目并重新启动计算机,但它也无济于事.我可以在源代码控制"->历史记录"下看到该项目的历史记录.我可以访问BitBucket上的存储库.

I've been working with this setup for awhile now (since Xcode 4) and didn't have any problems with it. Under Xcode->Preferences->Accounts->Repositories I saw the correct repository, but duplicated. I deleted and added it again, but it didn't help. I tried closing the project and rebooting the computer and it didn't help either. I can see the project's history under Source Control->History. I can access the repository on BitBucket.

您知道这是哪里来的以及如何解决此问题吗?

Any idea where this is coming from and how to solve this issue?

推荐答案

看来这与Bitbucket无关.

Well it seems this had nothing to do with Bitbucket.

问题是我的计算机上的.git文件夹混乱了. 我的项目位于Dropbox文件夹中.不知何故,也许是由于从不同的机器访问它,它在.git文件夹中创建了复制/重复文件,并弄乱了Git.解决所有冲突后,Git恢复了正常工作,我能够从Xcode提交到远程存储库.

The problem was a messed up .git folder on my machine. My project resides in a Dropbox folder. Somehow, perhaps because of accessing it from different machines, it created copy/duplicate files in the .git folder and it messed up Git. After fixing all the conflicts Git returned to working as usual and I was able to commit from Xcode to the remote repository.

现在,如果遇到此问题,您可能没有与我相同的设置,也可能没有使用Dropbox或任何类似服务,但是我强烈建议您彻底检查Git文件夹.很有可能那里有些东西弄乱了.

Now, if you encounter this issue, you might not have the same setup as mine or work on Dropbox or any similar service, but I strongly recommend checking your Git folder thoroughly. Good chance something is messed up there.

这篇关于Xcode 5:无法访问存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆