拒绝(公钥)我尽我的远程混帐服务器权限上推到远程混帐服务器
cd /var/www/vhost/example.com
sudo git init
sudo git remote add origin ssh://[email protected]:30000/home/git/repositories/example.git
sudo git add .
sudo git commit -a -m "Create empty example.com dir"
sudo git push origin master:refs/heads/master
我的ssh配置上创建新的仓库:
Host 111.111.111.111
User git
Port 30000
IdentityFile ~/.ssh/id_rsa
我的gitosis-admin.conf中
[gitosis]
[group gitosis-admin]
members = [email protected]
writable = gitosis-admin
[group example-com]
members = [email protected] [email protected]
writable = example-com
得到错误
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
我可以做
ssh [email protected]
没有问题,但不能做俯卧撑。我做错了什么?我也看过类似的前一个问题GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly,但我不使用github。
更新:好吧,我想问题在sudo。
此命令的完整whitout某种错误:
git push origin master:refs/heads/master
此命令:
sudo git push origin master:refs/heads/master
完整的错误:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
远程URL应该是'ssh://[email protected]:30000/example.git',如果它像gitolite nowaday一样远程工作。顺便说一句。你应该切换到[gitolite](http://gitolite.com/gitolite/),它是gitosis的继任者。 – poke 2013-03-12 17:40:37
无论如何,我采取错误权限被拒绝(publickey)。致命:远端意外挂断。 – user2112300 2013-03-12 17:52:14
当你正常ssh进入它,你有壳吗?如果是,则需要为存储库和标准ssh访问使用不同的公钥。 – poke 2013-03-12 18:24:24