7

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.

3 Answers 3

6

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.

1
  • I used this for an entirely different device, the Onion Omega2+ which uses a version of OpenWRT. Thanks!
    – Paul J
    Feb 18, 2017 at 19:14
1

Try cloning with the following syntax instead:

git clone [email protected]:username/reponame

1
  • Did you try it with the alternative syntax I posted? In step seven you didn't use this format, with the colon. Nov 4, 2013 at 15:33
0

I belive that terminal IDE has a problem right now where it cannot resolve host names. That means instead of github.com, you must use the IP adress also try using git clone https://IP/User/REPO.git

1
  • I get "cannot exec "git-remote-https" permission denied Oct 26, 2013 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.