[英]Can't clone git repo from gitolite on the same remote ubuntu server
I have gitolite on the remote ubuntu 16 server that keeps also production environment (nginx server and release version of web projects). 我在远程ubuntu 16服务器上有gitolite,它还保留了生产环境(nginx服务器和web项目的发布版本)。
Gitolite keeps common access project repository. Gitolite保留了通用访问项目存储库。 Development process is on the local machines.
开发过程在本地机器上。 A lot of successful pushes to gitolite project repository.
很多成功的推动到gitolite项目存储库。
Now i'm going to deploy (clone) git project from gitolite to /var/www/project directory on the same remote ubuntu server. 现在我将从gitolite部署(克隆)git项目到同一个远程ubuntu服务器上的/ var / www / project目录。
To do that I've: 要做到这一点,我有:
ssh-keygen -t rsa
ssh-keygen -t rsa
git-serveruser.pub
git-serveruser.pub
changed gitolite.conf 改变了gitolite.conf
repo repositoryname RW+ = git-admin git-serveruser
commited and pushed changes to the server 提交并推送更改到服务器
Then i've tried to clone repository with following ssh command: 然后我尝试使用以下ssh命令克隆存储库:
git clone git@localhost:repositoryname
Unfortunately i've got this permission error: 不幸的是我收到了这个权限错误:
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.
There is default testing repository with @all +RW permissions. 有@all + RW权限的默认测试存储库。 So've tried this one
所以试过这个
git clone git@localhost:testing
and got the same error... 并得到同样的错误......
Is't possible to clone repository from gitolite on the same remote machine? 是否有可能在同一台远程计算机上从gitolite克隆存储库? What i'm doing wrong?
我做错了什么? How can i solve this problem?
我怎么解决这个问题?
Just to be sure, try with 只是为了确定,试试吧
GIT_SSH_COMMAND='ssh -i /full/path/to/.ssh/id_rsa' git clone git@localhost:repositoryname
If it fails, double check the ssh troubleshooting , in particular check that your public key does end up in ~git/.ssh/authorized_keys
如果失败,请仔细检查ssh故障排除 ,特别检查您的公钥是否最终在
~git/.ssh/authorized_keys
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.