我的設置是Ubuntu - gitolite - msysgit。下面這個教程後:無法用新用戶克隆git存儲庫
https://sites.google.com/site/senawario/home/gitolite-tutorial
,一切工作正常。
所以我修改和COMMITED - 推配置文件:
repo gitolite-admin
RW+ = id_rsa
repo testing
RW+ = @all
repo project-euler
RW+ = tester
Everyhting得到了更新等
我現在想用「測試」的用戶來測試這一點,但我不能。不應該git clone tester @ myServer:project-euler工作嗎?
如果我嘗試上面我得到:
$ git clone [email protected]:project-euler
Cloning into project-euler...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
我想這從我用來管理git的同一臺機器。
如果我嘗試使用此:
git [email protected]:project-euler
我得到:對於拒絕id_rsa
這是正常的,我認爲,因爲git的用戶不能訪問項目 - 歐拉R接入。
任何想法?
在遵循@VonC鏈接之後,我創建瞭如上所述的配置文件。我仍然遇到同樣的問題,所以我在用戶遇到麻煩時就開始使用ssh -v。輸出是:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Stefanos/.ssh/config
debug1: Applying options for 192.168.1.3
debug1: Connecting to 192.168.1.3 [192.168.1.3] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Stefanos/.ssh/tester type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debian-1ubuntu3
debug1: match: OpenSSH_5.8p1 Debian-1ubuntu3 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.1.3' is known and matches the RSA host key.
debug1: Found key in /c/Users/Stefanos/.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
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/Stefanos/.ssh/tester
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
UPDATE
我設法使用Git clong git的@服務器克隆回購:回購 - 不測試儀@服務器:回購。
此外,如果我有配置文件,我不能以管理員身份登錄。它僅作爲測試者記錄。可能應該有一種方法來配置它。感謝你的幫助。
你有沒有複製*測試者的公鑰*? – Simon
我將它們複製到/ keydir目錄中,然後使用我的git帳戶推送更改。一切正常。我仔細檢查了刪除存儲庫並再次克隆,然後檢查新密鑰是否在那裏(它是)。 – FailedDev