SSH://1.2.3.4:PORT /路径/到/ repo.git
…填写用户名和密码.
然后我在Xcode中添加了机器人,但是当我打入集成时,会失败与日志:
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_hostsSSH strict host checking
is enabled (you can disable this by editing theSSHStrictHostKeyChecking key in
/Library/Server/Xcode/Config/xcsbuildd.plistUntrusted HTTPS
certificates is disabled (you can enable this by editing theTrustSelfSignedSSLCertificates key in
/Library/Server/Xcode/Config/xcsbuildd.plist
我假设有一个权限问题,但是在我的/ var中有一些具有不同权限的目录,当然没有服务器文件夹…
所以我不知道如何设置适当的权限(不改变/ var …的其他子目录的权限).我可以尝试手动创建目录“小组服务器”,但不知道有什么权限?你有什么想法吗
编辑:为了测试目的,我已经创建了777个teamserver目录,但这并不能解决我的问题.日志看起来与以前的butjust WITHOUT行相同:
Could not create directory ‘/var/teamsserver/.ssh’.
有任何想法吗?
谢谢
解决方法
Bots使用_teamsserver系统帐户运行构建.如您所见,默认情况下,这些帐户没有主目录.要设置访问和修改其主目录的构建,我已经取得了以下成功(您的里程可能会有所不同):
sudo mkdir /var/teamsserver sudo chown -R _teamsserver:_teamsserver /var/teamsserver/ sudo chmod -R 770 /var/teamsserver/
HTH