I try create new repositories on my remote git-server

```
cd /var/www/vhost/example.com
sudo git init
sudo git remote add origin ssh://git@111.111.111.111: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

```

My ssh config:

```
Host 111.111.111.111
User git
Port 30000
IdentityFile ~/.ssh/id_rsa

```

My gitosis-admin.conf

```
[gitosis]

[group gitosis-admin]
members = git@111.111.111.111
writable = gitosis-admin

[group example-com]
members = git@111.111.111.111 user@user
writable = example-com

```

Get error

```
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

```

I can do

```
ssh git@111.111.111.111

```

no problem, but can't do push. What i doing wrong? I had also looked into similar previous question [GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly](https://stackoverflow.com/questions/3617113/github-newbie-problems-permission-denied-publickey-fatal-the-remote-end) , but i don't use github.

**UPDATE:** Ok, i think problem in sudo.

This command complete whitout some sort of error:

```
git push origin master:refs/heads/master

```

This command:

```
sudo git push origin master:refs/heads/master

```

complete with error:

```
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

```