Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cloning from GitHub on Android using Terminal IDE

I tried following the directions here.

And I keep getting the following message:

ssh: connection to [email protected]:22 exited No auth methods could be used. fatal: The remote end hung up unexpectedly.

Steps I followed

  1. Made Key
  2. Copied Key to github.
  3. Checked Key was working properly by running

    ssh -i ~/.ssh/id_rsa [email protected]

  4. Created the file ssh-git in ~/local/bin/

    exec ssh -i ~/.ssh/id_rsa "$@"

  5. Make the file executable:

    chmod 755 ~/local/bin/ssh-git

  6. added the following line to ~/.bashrc

    export GIT_SSH=~/local/bin/ssh-git

  7. Ran this

    git clone [email protected]/username/reponame.git

  8. And I get the following error:

    ssh: connection to [email protected]:22 exited No auth methods could be used. fatal: The remote end hung up unexpectedly.

like image 692
richardnixonthethird Avatar asked Oct 26 '13 15:10

richardnixonthethird


People also ask

How do I clone an Android app from GitHub?

In Version control choose Git from the drop-down menu. Step 2: Then a pop-up box will come. Paste the link in the URL and choose your Directory. Click on the Clone button and you are done.

How do I clone a repository from my phone?

Quick start Enter local repository name - note that this is not a path since SGit stores all repositories in the same directory on the mobile device. Username - username to use to clone the remote repo. Password - password to use to clone the remote repo. Click the Clone button.


1 Answers

As described here you can set up cloning via ssh (HTTPS is not supported) with: first, a passphrase-less key in ~/.ssh/id_pub:

mkdir ~/.ssh
dropbearkey -t rsa -f ~/.ssh/id_rsa
dropbearkey -y -f ~/.ssh/id_rsa | sed -n 2p > ~/.ssh/id_rsa.pub

Second, a wrapper script ~/local/bin/ssh-git and make it executable with chmod +x ~/local/bin/ssh-git:

#!/data/data/com.spartacusrex.spartacuside/files/system/bin/bash
exec ssh -i ~/.ssh/id_rsa "$@"

Third, some settings in .bashrc. I have put it in another file included by .bashrc on Android only, so I can use the same .bashrc on other environments too:

export GIT_SSH=~/local/bin/ssh-git
export GIT_AUTHOR_NAME="USER NAME"
export GIT_AUTHOR_EMAIL="[email protected]"
export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL

Restart Terminal IDE before this changes can be used.

There is another thread on this is at https://code.google.com/p/terminal-ide/issues/detail?id=26.

like image 82
Jakob Avatar answered Sep 22 '22 16:09

Jakob