A
A
Artem2016-02-18 11:42:14
git
Artem, 2016-02-18 11:42:14

Git clone ssh - Permission denied (publickey) doesn't clone a repository?

Created a repository on my remote server.
I connect from my user to the server by key - everything is ok.
When trying to git clone:

sudo git clone [email protected]:/var/www/domain/my.git
Cloning into 'my'...
Permission denied (publickey).
fatal: Could not read from remote repository.

I can't understand - it turns out to enter the server by key, but when using git it rejects.
Tired of looking for answers.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Romanenko, 2016-02-18
@beardedman

sudo ssh [email protected] -- can you login?
Hinting at a solution to the problem: why avoid sudo?

K
krypt3r, 2016-02-18
@krypt3r

Check directory permissions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question