【发布时间】:2014-12-18 23:43:42
【问题描述】:
我正在设置一个带有 git 指南的 git 服务器 (http://git-scm.com/book/en/v2)。
所以我在 Ubuntu 服务器上创建了一个用户 git,我把我电脑的 ssh 密钥放在了authorized_keys 文件中。
我在 /repos/test/test.git 的 git 帐户上做了一个 repo
当我尝试使用
git clone git@196.168.0.114:/repos/test/test.git
它给了我这个:
Cloning into 'test'...
ssh: connect to host 196.168.0.114 port 22: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我的 git 账户也有密码
.ssh chmod 700 by git 帐号
git 账户的authorized_keys chmod 600
【问题讨论】:
-
文件夹
.ssh在服务器上的权限是什么?authorized_keys文件的权限是什么? -
.ssh 在服务器上是 chmod 700,授权密钥是 chmod 600。我用 git 帐户做了 chmods