Export to GitHub

terminal-ide - issue #26

Add ssh-keygen


Posted on Feb 2, 2012 by Swift Panda

With all the ssh we are doing, it would be nice to have ssh-keygen so we don't have to keep typing in the password over and over again.

Comment #1

Posted on Feb 7, 2012 by Happy Panda

Generate a key

$> dropbearkey -t rsa -f ~/.ssh/id_rsa

Your pub key is printed out after generation, you can get it again with

$> dropbearkey -y -f ~/.ssh/id_rsa

Add your new pub key on a server. Add the following to ~/.bashrc

alias ssh='ssh -i ~/.ssh/id_rsa'

Now you can ssh with that identity.

Comment #2

Posted on Feb 7, 2012 by Swift Panda

That seems to work. Thanks. However, it goes work with git though since I still need to type in my password.

Comment #3

Posted on Feb 18, 2012 by Swift Giraffe

The solution for getting TerminalIDE's git to using the correct ssh identity is set GIT_SSH to a workaround script. Explanation follows...

Create a file /data/data/com.spartacusrex.spartacuside/files/bin/ssh-with-default-key with following contents:

!/data/data/com.spartacusrex.spartacuside/files/system/bin/bash

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

chmod 755 /data/data/com.spartacusrex.spartacuside/files/bin/ssh-with-default-key

Then append to your .bashrc:

Git default ssh

export GIT_SSH=~/bin/ssh-with-default-key

Obviously to enable, you'll then need to restart TerminalIDE or set GIT_SSH manually for each terminal.

Comment #4

Posted on Feb 22, 2012 by Swift Elephant

I still need a ssh-agent because i need passphrase protection on my ssh-key. And it should drop the key after a while. Connectbot has a nice implementation of this feature.

angor

Comment #5

Posted on May 15, 2012 by Massive Lion

Comment 3 by Rupert works fine in my case.

I needed do something like that to work:

git clone git@github.com:myusername/myrepo.git
// or jping github.com git clone git@207.97.227.239:myusername/myrepo.git

Thanks a lot!

Comment #6

Posted on May 15, 2012 by Massive Lion

PS it should be added in tutorial. I've sp..ent 4h to find this solution.

PS2: great app! I've forked/cloned source to github.

Comment #7

Posted on Jun 8, 2012 by Happy Ox

Sorry folks, but I need help, what am I doing wrong?

terminal++@ echo $GIT_SSH /data/data.../sshwithkey terminal++@ $GIT_SSH -T git@github.com Hi xxx! You've successfully authenticated, but GitHub does not provide shell access. terminal++@ git clone https://github.com/xxxx/repo Cloning into xxxx fatal: cannot exec 'git-remote-https': Permission denied

(the same git clone command works on another machine).I think I've demonstrated that my key and script are ok ... and the environment variable is set ...

Comment #8

Posted on Jun 8, 2012 by Massive Lion

Have You tried to do :

git clone https://207.97.227.239/xxxx/repo

Instead of doing:

git clone https://github.com/xxxx/repo

?

Comment #9

Posted on Jun 8, 2012 by Happy Ox

I hadn't ... but it doesn't make any difference ... clearly I'm doing something wrong, but I don't know what :-(

Comment #10

Posted on Jun 9, 2012 by Massive Lion

Have You add public part of your ssh key on github.com? Github needs to know it in order to authenticate properly your device.

Comment #11

Posted on Jun 9, 2012 by Happy Ox

Comment deleted

Comment #12

Posted on Jun 9, 2012 by Happy Ox

Thanks. Yes my credentials are ok in both places (as you can see from the working $GIT_SSH command). However, it still doesn't seem to work ...

Comment #13

Posted on Jun 11, 2012 by Happy Ox

Ok, on other issues, spartacus has said, several times ... no https support.

My clone does work, with git clone git:/207.97.227.239/xxxx/repo (not with github, and not with https).

I can now work ... magic!

Comment #14

Posted on Jun 11, 2012 by Massive Lion

Hmm... Strange cos I can pull & push from github via my mobile device. Example:

https://github.com/hopbit/java-sandbox 11-06-2012 11:04, napisa�(a):

Comment #15

Posted on Jul 24, 2012 by Quick Dog

Hey all. The dropbearkey method above works perfectly (remember to restart Terminal IDE after adding the ssh alias).

Comment #16

Posted on Jul 25, 2012 by Massive Lion

Additional info - I have defined such alias in ~/.bashrc (or ~/.bash_aliases):

alias ssh='ssh -i ~/.ssh/id_rsa' 25-07-2012 01:34, napisa�(a):

Comment #17

Posted on Sep 13, 2012 by Massive Dog

Hi, comment #3 works for me, thanks

Comment #18

Posted on Jul 27, 2013 by Quick Ox

Comment deleted

Comment #19

Posted on Aug 17, 2013 by Helpful Dog

Comment deleted

Comment #20

Posted on Aug 17, 2013 by Helpful Dog

I was able to get it to clone now but. When I push it gives me cannot exec git-remote-https

Comment #21

Posted on Aug 17, 2013 by Helpful Dog

Comment deleted

Comment #22

Posted on Aug 18, 2013 by Helpful Dog

What should I replace this line with??? git remote add origin git@github.com:xxxxx/Test.git I don't know I did $SSH -T git@github.com It works I can clone...

Comment #23

Posted on Aug 18, 2013 by Massive Lion

I've updated my termide to latest 2.0.0. Now I can't even clone...

But recently I don't use termide at all. I've made my last "push" to github from my mobile device couple months (maybe a year) ago...

My advice is to try mess around with configuration & using ip (jping github). Try to log back your changes on some paper, You'll know what activity/change make your environment works :-) And I hope You'll share this solution with us :-) 18-08-2013 04:39, napisa�(a):

Comment #24

Posted on Aug 20, 2013 by Helpful Dog

I have v.2.0 also and I emailed spartacus and asked he said something about ssh -L??? I know I have to connect to github using ssh... but he said something about port forwarding... I did everything above and I know this is keygen which I learned how to do (thx) but I try git remote add origin (I've tried everything...) git push origin master I always get something like cannot exec git-remote-https Or Try https://url If I try git: Does anyone have a good tutorial on this????

Status: New

Labels:
Type-Defect Priority-Medium