我的 Raspberry Pi 上有一个 git-server,它使用 gitweb 作为 web 界面。
到目前为止它的工作。
现在我想通过带有内置 ssh 的 Android Studio 连接到它。
我的项目目录是:
/home/git/straff.git
我将从 Android Studio 连接这个命令:
:ssh:git@192.168.178.21:/straff
当我测试连接时,Android Studio 给了我这个:
Cannot access /straff/CVSROOT
我正在使用密码验证。我可以从命令行工具访问我的仓库...
为什么 Android Studio 不能?
请您参考如下方法:
I can access from command line tools to my repo...
Why Android Studio cant?
您的错误是您正在尝试访问 192.168.178.21:/straff,这是该机器上的/straff。提供如下所示的完整路径或使用此路径
:ssh:git@192.168.178.21:straff
旧帖:
您可以尝试指定 Android Studio 的完整路径:
:ssh:git@192.168.178.21:/home/git/straff
I am using password auth for it.
这意味着 ssh 连接不使用私有(private)/公共(public) (
~/.ssh/id_rsa(.pub) ) key 。
标题为“ How to push to a remote Git repository over SSH with private/public key authentication using Android Studio”的 Android Studio 教程是一个很好的教程。




