我在远程ubuntu 16服务器上也保留了生产环境(nginx服务器和发布版本的web项目)的gitolite。无法在同一台远程ubuntu服务器上从gitolite克隆git repo
Gitolite保留共同访问项目存储库。开发过程在本地机器上。很多成功推动gitolite项目存储库。
现在我要从gitolite部署(克隆)git项目到同一远程ubuntu服务器上的/ var/www/project目录。
为了做到这一点我有:
- 下我的普通用户通过ssh连接到服务器使用sudo权限(不git的用户)
- rsa.pub
ssh-keygen -t rsa
- 复制rsa.pub产生到本地机器与gitolite管理员权限的keydir作为
git-serveruser.pub
改变gitolite.conf
repo repositoryname RW+ = git-admin git-serveruser
COMMITED推更改服务器
然后我试图克隆库具有以下ssh命令:
git clone [email protected]:repositoryname
不幸的是我有这个权限错误:
Cloning into 'repositoryname'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
有默认测试回购具有@all + RW权限的itory。 So've尝试这一个
git clone [email protected]:testing
,并得到了同样的错误...
难道光是可能克隆从gitolite库中同一远程机器上?我做错了什么?我怎么解决这个问题?
你放置在私钥用户SSH目录? (例如'〜/ .ssh') –
@AndrzejZabost是 – Andrew