2012-02-21 2 views
0

직장에서 gitosis 서버를 사용하고 개인 프로젝트에도 github을 사용합니다. 두 계정에 동일한 공용 및 개인 ssh 키를 사용하려고 시도하고 있습니다. 유일한 차이점은 gitosis의 사용자 이름입니다. md.mercado49이고 github에서는 maumercado입니다.Gitosis 공개 키 사용 권한이 거부되었습니다.

gitosis에 내 공개 키를 이미 업로드했으며 물론 gitosis에 공개 키를 업로드 했으므로 gitosis 서버에 연결할 때 권한이 거부되지만 github에 연결할 때 성공합니다. 같은 열쇠. 나는 ssh를 -Vt의 [email protected] 명령으로 무엇을 얻을 Heres는

:

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). 

이 임하려고 노력 무엇을 할 경우에도 가능, 같은 키 인증 다른 사용자 이름과 이메일?

다른 계정에 대해 다른 키를 생성해야합니까? 그렇다면 어떻게해야합니까?

도움 주셔서 감사합니다.

... 또한 저는 믿을 수는 없지만 누가 github 정보로 git global config를 설정했는지 알고 있습니다.하지만 git config 정보가있는 회사의 프로젝트에서 --local ...은 아무런 문제가 없습니다.

==== 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_gsg_keypair를 제공하는 경우 그 사실 개인 키 및 id_dsa가 존재하지 않는 경우 개인 키로 사용할 수 있습니까?

답변

1

공용 SSH 키를 사용하는 빈도 및 위치는 제한이 없습니다. 키의 이름은 문서 목적으로 사용됩니다. 시스템이 키 유형 (RSA/DSA)을 지원하는 한.

gitosis가 키와 함께 작동 했습니까? 구성이 약간 까다 롭습니다. 또한 키 파일에 줄 바꿈이 없는지 확인하십시오.

git config 질문에 대해서는 로컬 설정이 글로벌 설정보다 우선합니다. 하지만 그건 당신이하는 방식대로 잘됩니다.

+0

안녕하세요 @iltempo, 실제로 여전히 같은 문제를주고, gitosis 서버 키는 dsa입니다. 나는 redmine-gitosis plugin 공개 키에서 내 열쇠를 검사했는데 그곳에 이상한 것이 없거나 공간 같은 것이 아무것도 없다. – maumercado

+0

붉은 빛이 gitosis에 어떤 영향을 미치는지 모르겠습니다. 구성을 게시 할 수 있습니까? – iltempo

+0

어떤 파일을 내게 보내시겠습니까? 아니면 redmine의 플러그인 구성에 대해 이야기하고 있습니까? 그렇다면 여기에 - http://cl.ly/072e14363L0G2R1g2v46 – maumercado