Piet Piet - 4 months ago 60
Android Question

Android-Studio git over ssh

I got a git-server on my Raspberry Pi with gitweb as webinterface.

Its working so far.

Now I want to connect via Android Studio with the built-in ssh to it.

My project dir is :

/home/git/straff.git


I'll connect with this command from Android Studio:

:ssh:git@192.168.178.21:/straff


Android Studio is giving me this when I test the connection:

Cannot access /straff/CVSROOT


I am using password auth for it. I can access from command line tools to my repo...

Why Android Studio cant?

Answer

I can access from command line tools to my repo...
Why Android Studio cant?

Your error is you are trying to access 192.168.178.21:/straff which is /straff on that machine. Either provide the full path like below or use this one

:ssh:git@192.168.178.21:straff

Old post:

You can try to specify the full path to Android Studio:

:ssh:git@192.168.178.21:/home/git/straff

I am using password auth for it.

That means the ssh connection doesn't use a private/public (~/.ssh/id_rsa(.pub)) key.

A good tutorial to follow with Android Studio is the one titled "How to push to a remote Git repository over SSH with private/public key authentication using Android Studio".