求教CentOS上安装gitosis时遇到的问题,高分请教

yusongkun 2012-02-10 03:30:51
我在两台服务器上尝试安装gitosis,都在同一个步骤上出现了相同的问题。
问题如下:

运行sudo -H -u git gitosis-init < id_rsa.pub之后,仓库以及对应的文件都创建成功。

但是在客户端上执行git clone git@ip:gitosis-admin时,都出现了一下问题:
$ git clone git@192.168.0.2:gitosis-admin.git
Cloning into 'gitosis-admin'...
Permission denied (publickey,gssapi-with-mic).
fatal: The remote end hung up unexpectedly

我用ssh -v git@ip测试的结果如下:
$ ssh -v git@192.168.0.2
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Administrator/.ssh/config
debug1: Applying options for 192.168.0.2
debug1: Applying options for 192.168.0.2
debug1: Applying options for 192.168.0.2
debug1: Connecting to 192.168.0.2 [192.168.0.2] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Administrator/.ssh/id_rsa.hzq type 1
debug1: identity file /c/Users/Administrator/.ssh/id_rsa.2 type 1
debug1: identity file /c/Users/Administrator/.ssh/git type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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 '192.168.0.2' is known and matches the RSA host key.
debug1: Found key in /c/Users/Administrator/.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: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/Administrator/.ssh/id_rsa.hzq
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Offering public key: /c/Users/Administrator/.ssh/id_rsa.2
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Offering public key: /c/Users/Administrator/.ssh/git
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic).


这个问题已经困扰我两天了,搜遍了各个网站(中英文)。都没办法解决这个问题。
不知道这里是否能帮忙解决了。
...全文
131 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Liv2005 2012-02-13
  • 打赏
  • 举报
回复
把id_rsa和id_rsa.pub扔到这个目录下:/c/Users/Administrator/.ssh/
yusongkun 2012-02-13
  • 打赏
  • 举报
回复
木有人能解决吗?

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧