无法创建目录/ var / teamsserver [英] Could not create directory /var/teamsserver

查看:479
本文介绍了无法创建目录/ var / teamsserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的Mac上安装了os x server(Mavericks),并且想要添加bot。由于某些原因,我的远程仓库位于其他外部服务器上,我可以通过指定端口上的用户名和密码访问它。我已经添加远程repo到os x服务器像这样:



ssh://1.2.3.4:PORT / path / to / repo.git



...填充用户名和密码。



然后我在Xcode中添加了bot,但当我点击集成:


克隆到'ssh_myusername_1_2_3_4_PORT_path_to_repo_git'...



OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1:Reading



配置数据/ etc / ssh_config debug1:/ etc / ssh_config第20行:



应用* debug1的选项:连接到1.2.3.4 [1.2.3.4]端口PORT。



debug1:建立连接。



无法创建目录/var/teamsserver/.ssh。



debug1:身份档案/var/teamsserver/.ssh/id_rsa类型-1



debug1: /var/teamsserver/.ssh/id_rsa-cert type -1



debug1:身份档案/var/teamsserver/.ssh/id_dsa type -1



debug1:身份文件/var/teamsserver/.ssh/id_dsa-cert类型-1



debug1:启用协议的兼容模式2.0



debug1:本地版本字符串SSH-2.0-OpenSSH_6.2



debug1:远程协议版本2.0,远程软件版本OpenSSH_6.0p1 Debian-3ubuntu1



debug1:match:OpenSSH_6.0p1 Debian-3ubuntu1 pat OpenSSH *



debug1:SSH2_MSG_KEXINIT已发送



debug1:收到SSH2_MSG_KEXINIT



debug1:kex:server-> client aes128- ctr hmac-md5 none



debug1:kex:client-> server aes128-ctr hmac-md5 none



debug1:发送的SSH2_MSG_KEX_DH_GEX_REQUEST(1024 <1024 <8192)



debug1:预期SSH2_MSG_KEX_DH_GEX_GROUP



debug1:发送SSH2_MSG_KEX_DH_GEX_INIT



debug1:预期SSH2_MSG_KEX_DH_GEX_REPLY



debug1:服务器主机密钥:RSA b6:b8:0e:e4: 63:6d:64:a3:d6:6d:7f:46:85:72:0d



debug1:无端口标识符检查未知RSA主机密钥[ 1.2.3.4]:PORT
并且您已请求严格检查。主机密钥验证失败。



致命:无法从远程存储库读取。



请确保您正确的访问权限和存储库
存在。



SSH已知主机文件路径位于
/ Library / Server / Xcode / Config / ssh_known_hosts



SSH严格主机检查
已启用(您可以通过编辑



SSHStrictHostKeyChecking
/Library/Server/Xcode/Config/xcsbuildd.plist



不受信任的HTTPS
证书已禁用(您可以通过编辑

TrustSelfSignedSSLCertificates金钥在
/Library/Server/Xcode/Config/xcsbuildd.plist


我假设有一个权限的问题,但在我/ var有一些目录具有不同的权限,当然没有团队服务器文件夹...



所以我不知道如何设置适当的权限(不更改/ var ...的其他子目录的权限)。我可以尝试手动创建目录团队服务器,但不知道用什么权限...?你有什么想法吗?



编辑:为了测试目的,我创建了teamsserver目录777,但这不能解决我的问题。日志看起来与以前的butjust一样没有行:


无法创建目录/var/teamsserver/.ssh。



h2_lin>解决方案

好吧,我花了一些时间,但我有一个解决方案...两个解决方案。愧疚地承认,但阅读和理解日志就足以解决问题了(再次:P)。



第一个答案:



在安装os x服务器之前,我的服务器主机密钥已添加到.ssh / known_hosts。服务器不使用已知主机的路径。日志表示服务器使用:


SSH已知主机文件路径位于
/ Library / Server / Xcode / Config / ssh_known_hosts


,该文件在我的案例中为空。所以为了解决这个问题,将known_hosts复制到ssh_known_hosts就够了:

  sudo cp〜/ .ssh / known_hosts / Library / Server / Xcode / Config / ssh_known_hosts 

这很简单。



第二个答案:



根据日志再次


SSH strict主机检查已启用(您可以通过编辑
禁用此功能。/Library/Server/Xcode/Config/xcsbuildd.plist中的SSHStrictHostKeyChecking键


将SSHStrictHostKeyChecking更改为false。



再次完成。


I've installed os x server (Mavericks) on my mac and would like to add bot. For some reasons my remote repo is located on other external server and I have access to it by username and password on specified port. I've added remote repo to os x server like this:

ssh://1.2.3.4:PORT/path/to/repo.git

...filled username and password.

Then I've added bot in Xcode but when I hit integrate it fails with logs:

Cloning into 'ssh_myusername_1_2_3_4_PORT_path_to_repo_git'...

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading

configuration data /etc/ssh_config debug1: /etc/ssh_config line 20:

Applying options for * debug1: Connecting to 1.2.3.4 [1.2.3.4] port PORT.

debug1: Connection established.

Could not create directory '/var/teamsserver/.ssh'.

debug1: identity file /var/teamsserver/.ssh/id_rsa type -1

debug1: identity file /var/teamsserver/.ssh/id_rsa-cert type -1

debug1: identity file /var/teamsserver/.ssh/id_dsa type -1

debug1: identity file /var/teamsserver/.ssh/id_dsa-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_6.2

debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3ubuntu1

debug1: match: OpenSSH_6.0p1 Debian-3ubuntu1 pat OpenSSH*

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-ctr hmac-md5 none

debug1: kex: client->server aes128-ctr hmac-md5 none

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

debug1: Server host key: RSA b6:b8:0e:e4:25:63:6d:64:a3:d6:6d:7f:46:85:72:0d

debug1: checking without port identifier No RSA host key is known for [1.2.3.4]:PORT and you have requested strict checking. Host key verification failed.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts

SSH strict host checking is enabled (you can disable this by editing the

SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist

Untrusted HTTPS certificates is disabled (you can enable this by editing the

TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist

I assume that there is a problem with permissions but in my /var there are some directories with different permissions and of course there is no teams server folder...

So I don't know how to setup proper permissions (without changing permissions of other subdirectories of /var...). I can try manually make directory "teams server" but don't know with what permissions... ? Do you have any ideas?

EDIT: For test purpose I've created teamsserver directory with 777 but that doesn't solve my problem. Logs looks the same as previous butjust WITHOUT line:

Could not create directory '/var/teamsserver/.ssh'.

Any ideas?

Thanks

解决方案

Ok, I took some time but I've a solution... Two solutions actually. Ashamed to admit but read and understand logs is enough to solve the problem (again :P).

FIRST ANSWER:

My server host key was added to .ssh/known_hosts BEFORE installing os x server. Server does't use that path of known hosts. As log says server uses:

SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts

and that file was empty in my case. So to solve the problem it is enough to copy known_hosts to ssh_known_hosts:

sudo cp ~/.ssh/known_hosts /Library/Server/Xcode/Config/ssh_known_hosts

It's that simple.

SECOND ANSWER:

Acording to log again

SSH strict host checking is enabled (you can disable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist

Change SSHStrictHostKeyChecking to false.

It's done again.

这篇关于无法创建目录/ var / teamsserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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