Josh M.
Josh M.

Reputation: 27811

SVN checkout to directory I don't own (via SSH)

I'm using SVN+SSH to authenticate to my SVN server. I'm trying to checkout a repo on another server. The directory to which I want to checkout is not owned by my, so I wanted to sudo it up.

When I try svn co svn+ssh://[email protected]/svn/MyRepo, naturally, I can't write to the directory and the checkout fails.

When I try sudo svn co svn+ssh://[email protected]/svn/MyRepo, my SSH key can't seem to be accessed - I get the error: "Permission denied (publickey)"

So I want to have sudo run as myself, yet give me extra privileges (I think). How do I do that? E.g. I need permission to write to the directory but also need to be able to access my SSH key.

Upvotes: 1

Views: 222

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97325

When you sudo, you try to authenticate himself on remote host not as current-local user (obviously) and thus - doesn't provide needed public key (ieven if can provide any)

I think, you have to re-read SVN Book, "svnserve, a Custom Server" chapter and "Tunneling over SSH" section most carefully, and create "custom tunnel", in which you (at least) will use your correct, predefined key: ssh -i ... in tunnel definition

Upvotes: 1

Related Questions