2012-02-21 114 views
0

我有一個gitosis服務器在工作,我也使用github進行個人項目,我試圖對兩個帳戶使用相同的公共和私人ssh密鑰,唯一的區別是gitosis中的用戶名是md.mercado49和github是maumercado。Gitosis publickey permission denied

我已經將我的公鑰上傳到gitosis上,當然我在github上已經有一段時間了,現在問題是我在嘗試連接到gitosis服務器時被拒絕了權限,但是當它連接到github時成功同樣的鑰匙。

繼承人我得到什麼用SSH -vT [email protected]命令:

OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: Applying options for * 
debug1: Connecting to repocomit.virtual.uniandes.edu.co [157.253.238.144] port 22. 
debug1: Connection established. 
debug1: identity file /Users/maumercado/.ssh/id_rsa type 1 
debug1: identity file /Users/maumercado/.ssh/id_rsa-cert type -1 
debug1: identity file /Users/maumercado/.ssh/id_dsa type -1 
debug1: identity file /Users/maumercado/.ssh/id_dsa-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu7 
debug1: match: OpenSSH_5.3p1 Debian-3ubuntu7 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.6 
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: Host 'repocomit.virtual.uniandes.edu.co' is known and matches the RSA host key. 
debug1: Found key in /Users/maumercado/.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 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /Users/maumercado/.ssh/id_rsa 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /Users/maumercado/.ssh/id_dsa 
debug1: No more authentication methods to try. 
Permission denied (publickey). 

它甚至有可能做什麼我試着做,使用相同的密鑰認證和不同的用戶名和電子郵件?

我應該爲另一個帳戶生成不同的密鑰嗎?如果是這樣,怎麼辦?

謝謝大家的幫助!

...另外,我相信不相干,但誰知道,我建立git的全球配置與github的信息,但在公司的項目我有git配置 - 本地...應該是沒有問題的權利?

==== ==== UPDATE

所以我注意到,在下面的調試部分:

debug1: Offering RSA public key: /Users/maumercado/.ssh/id_rsa 
debug1: Authentications that can continue: publickey 
debug1: Trying private key: /Users/maumercado/.ssh/id_dsa 

爲什麼給id_rsa我的公鑰時,其實際的私人密鑰和id_dsa作爲我的私人密鑰時,甚至不存在?

回答

1

對使用​​公共ssh密鑰的頻率以及位置沒有限制。密鑰中的名稱更多用於文檔目的。只要系統支持密鑰類型(RSA/DSA)即可。

gitosis有沒有與您的密鑰一起工作?配置有點棘手。同時確保它的關鍵文件中沒有換行符。

關於你的git config問題:本地設置覆蓋全局設置。但是,這很好,你做到這一點。

+0

你好@iltempo,實際上仍然給出同樣的問題,gitosis服務器密鑰是一個dsa。我已經在redmine-gitosis插件公鑰中檢查了我的密鑰,並且在那裏沒有任何奇怪的東西,比如空間或任何東西! – maumercado 2012-02-21 14:55:10

+0

我不知道redmine對gitosis做了什麼。你可以發佈你的配置嗎? – iltempo 2012-02-21 22:24:40

+0

你想讓我給你哪個文件...或者你正在談論redmine中的插件配置,如果是這樣的話 - > http://cl.ly/072e14363L0G2R1g2v46 – maumercado 2012-02-22 13:31:59

相關問題