OS X Server + GIT与SSH的集成失败,出现权限被拒绝的错误 [英] OS X Server + GIT integration with SSH Fails with Permission Denied Error

查看:92
本文介绍了OS X Server + GIT与SSH的集成失败,出现权限被拒绝的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的GIT服务器托管在单独的Linux服务器上.我有没有密码的SSH RSA密钥.

我能够使用Xcode连接到GIT服务器,并且所有操作都可以通过Xcode 5.0.2在Source Control中正常工作.

我在本地计算机上安装了OS X Server. 以下是我的OS X Server设置配置:

  1. 将远程存储库添加为:ssh://myuser@XXXXXXX.XXXX.com:22/iphone_project
  2. 我已确保在OS X Server for SSH中我的公共帐户是正确的.我已将SSH pub密钥从/.ssh/id_rsa.pub复制粘贴到OS X Server.

.

Cloning into 'ssh_XXXX_XXXX_XXX_com_22_mtp_iphone'...
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 XXXXXX.XXXXXX.com [172.20.10.65] port 22.
debug1: Connection established.
Could not create directory '/var/teamsserver/.ssh'.
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa type 1
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa-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_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
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 26:70:37:3a:56:bd:17:bd:9d:6a:14:c0:21:23:65:1c
debug1: Host 'XXXXXX.XXXX.com' is known and matches the RSA host key.
debug1: Found key in /Library/Server/Xcode/Config/ssh_known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1:  Miscellaneous failure (see text)
No credentials cache file found

debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug1:  Miscellaneous failure (see text)
unknown mech-code 2 for mech 1 3 6 1 4 1 311 2 2 10

debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
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 disabled (you can enable 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

我的问题是:为什么在所有配置设置后我的身份验证仍然失败?

在GIT或O​​S X SERVER的设置中是否缺少任何要点?

解决方案

确保使用ssh命令的确切帐户:

它的$HOME/.ssh必须具有id_rsa.pub id_rsa(公用私钥).

请确保.ssh文件夹及其文件的权限是正确的,如" Git SSH身份验证中所述.
使用EGit,将在" Eclipse SSH配置中引用并声明这些文件夹:

I have GIT server hosted on separate Linux server. I have SSH RSA keys without password.

I am able to connect to GIT Server with Xcode and all operations are working properly in Source Control through Xcode 5.0.2.

I have OS X Server install in my local machine. Following is my OS X Server setup configuration:

  1. Added the Remote Repository as : ssh://myuser@XXXXXXX.XXXX.com:22/iphone_project
  2. I had make sure that my public is correct in OS X Server for SSH. I had copy paste SSH pub key from /.ssh/id_rsa.pub to OS X Server.

.

Cloning into 'ssh_XXXX_XXXX_XXX_com_22_mtp_iphone'...
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 XXXXXX.XXXXXX.com [172.20.10.65] port 22.
debug1: Connection established.
Could not create directory '/var/teamsserver/.ssh'.
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa type 1
debug1: identity file /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa-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_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
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 26:70:37:3a:56:bd:17:bd:9d:6a:14:c0:21:23:65:1c
debug1: Host 'XXXXXX.XXXX.com' is known and matches the RSA host key.
debug1: Found key in /Library/Server/Xcode/Config/ssh_known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1:  Miscellaneous failure (see text)
No credentials cache file found

debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug1:  Miscellaneous failure (see text)
unknown mech-code 2 for mech 1 3 6 1 4 1 311 2 2 10

debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Library/Server/Xcode/Data/BotRuns/BotRun-92b17427-aac4-40fa-92fa-5c73384b7d0f.bundle/credentials/b5964671-8db0-482c-93ee-870a0243295d/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: Device not configured
debug1: permanently_drop_suid: 94
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
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 disabled (you can enable 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

My Question is: Why my authentication is still failing after all configuration setup?

Are there any missing point in set up of GIT or OS X SERVER?

解决方案

Make sure of the exact account which make the ssh command:

Its $HOME/.ssh must have id_rsa.pub, and id_rsa (public and private key).

Make sure the permission of the .ssh folder and its files is correct, as described in "Git SSH authentication" .
With EGit, those folder are referenced and declared in "Eclipse SSH Configuration":

这篇关于OS X Server + GIT与SSH的集成失败,出现权限被拒绝的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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