无法使用Xcode 6.0.1访问OS X Server 3.2.1上的存储库 [英] Cannot access repositories on OS X Server 3.2.1 with Xcode 6.0.1

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

问题描述


该问题显然已通过OSX Server版本4解决.

原始帖子:
我在OS X服务器上有一些git存储库.以前,我可以从远程Xcode毫无问题地访问它们.
使用Xcode 6.0.1升级到OS X Server 3.2.1 后,我无法再访问它们:

Original post:
I have some git repositories on OS X server. Earlier I could access them from a remote Xcode without problems.
After the upgrade to OS X Server 3.2.1 with Xcode 6.0.1, I can no longer access them:

如果我尝试通过首选项/帐户"将服务器添加到Xcode中,它会显示

If I try to add the server to a the Xcode via Preferences / Accounts, it says

Xcode Server is unavailable 

如果我通过终端使用命令

If I try it via the terminal with the command

git clone <repository path>

询问密码(即可以访问服务器),然后说

it is asking for the password (i.e. it can access the server), and then says

fatal: repository '<repository path>' not found  

这真的很烦人,因为以前一切都很好.有什么我可以解决的帮助吗?

It is really annoying since everything worked fine before. Any help how I could fix this?

当然,新的OS X服务器将存储库显示在Xcode/存储库下,因此它们仍然存在...

Of course, the new OS X server shows the repositories under Xcode / Repositories, so they are still there...

我刚刚意识到,有时(非常罕见)可以在本地Xcode和远程Xcode中找到存储库,并且可以立即或在询问密码后访问它们.非常令人沮丧!

I just realized that sometimes (very rarely) a local Xcode as well as a remote Xcode find the repositories and can access them either immediately, or after asking for the password. Very frustrating!

编辑(由于Dan Hansen的回答):

我尝试使用SSH,但失败了:

I tried to use SSH, but failed:

  • 在远程OS X服务器上,我启用了对存储库的SSH访问.
  • 在Mac上的Xcode下,我使用SSH添加了远程存储库 协议.效果很好.
  • 然后我尝试在Xcode下进行拉取,并要求输入密码.后 输入正确的密码,它声称这是错误的.
  • 从Xcode进行的进一步访问总是给出无远程控制".
  • 我切换到终端,并发出"git clone"命令.有人问我 3次输入密码,然后出现错误权限被拒绝" (公钥,gssapi-keyex,gssapi-with-mic,键盘交互)"
  • On the remote OS X server, I enabled SSH access to the repositories.
  • On my Mac under Xcode, I added the remote repository using SSH protocol. This worked fine.
  • I then tried a pull under Xcode, and was asked for the password. After entering the correct password, it claimed that it were wrong.
  • Further accesses from Xcode always gave „no remotes".
  • I switched to terminal, and issued a „git clone" command. I was asked 3 times for the password, and got then the error „Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive)"

所以在我看来,这是一个授权问题,但我不知道该如何处理.

So it seems to me like an authorization problem, but I don’t know how to approach it.

推荐答案

升级后,我遇到了同样的问题,并制定了适用于我的修复程序.也许它也会对您有帮助.

I encountered this same problem after the upgrade and worked out a fix that works for me. Perhaps it will help you as well.

我在Server应用程序的Xcode服务下运行了一个HTTPS GIT存储库.我使用它来同步本地Macbook Pro(服务器),运行Win 8.1的VM(虚拟机)和运行在另一个Macbook Pro(也为Win 8.1)上的远程VM上的项目.

I have an HTTPS GIT repository running under the Xcode service in the Server app. I use it for syncing projects that are on the local macbook pro (the Server), a VM (virtual machine) running Win 8.1 and a remote VM running on another macbook pro (also Win 8.1).

在两个Macbook Pro上,我使用Xcode与GIT存储库进行交互.我使用"GIT bash"命令行与Win 8.1存储库进行交互.效果很好.

On the two macbook pro's I use Xcode to interact with the GIT repo. I use "GIT bash" command line to interact with the Win 8.1 repo(s). Works great.

使用Xcode 6.0.1升级到OS X Server 3.2.1破坏了我的存储库.首先,我遇到了证书问题-处理完这些证书后,我开始获取致命的:未找到的存储库...".您看到的错误.

我研究了这个问题,并开始研究日志和新服务.我怀疑,潜在的问题可能是错误的符号链接(日志中有关于ScriptAliases的/git错误提示的投诉),但是我越深入新目录结构,就越能发现问题有点令人费解的野兽,我真的不想只是开始弄乱符号链接,等等.看起来就像是灾难的公式.

I researched the issue and started digging into the logs and new Service. I suspect the underlying problem may be something like a bad symlink (there were complaints in the log about ScriptAliases for /git being wrong) but the more I dug into the new directory structure the more I saw it was a bit of a convoluted beast, and I did not really want to just start messing around with the symlinks, etc. Seemed like a formula for disaster.

对我来说,解决方法是切换为使用 SSH 来引用存储库(而不是HTTPS).

The fix for me was to switch to using SSH for referencing the repo (rather than HTTPS).

因此,在远程VM上,我执行了以下操作:

So on the remote VM I did the following:

git远程rm起源

git remote rm origin

git remote add origin ssh://dhansen@my-server-address/git/my-repo.git

git remote add origin ssh://dhansen@my-server-address/git/my-repo.git

git push -u原始主机

git push -u origin master

当然,我必须确保我拥有远程登录"在共享"中打开并正确设置了ssh,但除此之外,它还是很有魅力.

Of course, I had to make sure that I had "remote login" turned on in "Sharing" and had ssh set up properly, but otherwise it worked like a charm.

在另一个远程VM上,我必须做很多相同的事情.当尝试从一个远程Win 8.1 VM推送到第二个Xcode服务存储库时,当出现错误"remote:error:权限不足,无法将对象添加到存储库数据库./objects"时,我确实遇到了皱纹.远程:致命:无法写入对象"

On the other remote VM, I had to do much the same thing. I did encounter a wrinkle when trying to push from one of the remote Win 8.1 VM to the second Xcode service repo, when it had an error "remote:error: insufficient permission for adding an object to the repository database ./objects. remote: fatal: failed to write object"

我必须:

cd/库/开发人员/XcodeServer/HostedRepositories

cd /Library/Developer/XcodeServer/HostedRepositories

并更改权限.看起来有些东西现在是root:_xcs,有些东西是root:_www所有.

and change the permissions. Looked like somethings were now root:_xcs and some were owned by root:_www.

这解决了最后一个问题.现在,这一切再次变得像魔咒一样,我很放心,尽管我很烦恼我不得不花很多时间对其进行故障排除.

That fixed the last issue. And now it all works like a charm again, I am much relieved, though annoyed I had to spend so much time troubleshooting it.

一个正常的升级完全破坏了与存储库的HTTPS连接,这是一个完全的烦恼,但是对我来说幸运的是,您似乎可以使用SSH解决该问题.

It is a complete annoyance that a normal upgrade broke perfectly fine HTTPS connections to the repositories, but luckily for me it looks like you can work around it using SSH.

祝你好运!

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

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