medoxaff / terminal-ide

Automatically exported from code.google.com/p/terminal-ide
0 stars 0 forks source link

Add ssh-keygen #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by duc...@gmail.com on 2 Feb 2012 at 6:01

GoogleCodeExporter commented 8 years ago
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.

Original comment by dan...@dasa.cc on 7 Feb 2012 at 3:02

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

Original comment by duc...@gmail.com on 7 Feb 2012 at 6:53

GoogleCodeExporter commented 8 years ago
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.

Original comment by Rupert....@gmail.com on 18 Feb 2012 at 2:49

GoogleCodeExporter commented 8 years ago
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

Original comment by ang...@gmail.com on 22 Feb 2012 at 6:17

GoogleCodeExporter commented 8 years ago
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!

Original comment by lsiwinski on 15 May 2012 at 12:10

GoogleCodeExporter commented 8 years ago
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.

Original comment by lsiwinski on 15 May 2012 at 12:13

GoogleCodeExporter commented 8 years ago
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 ...

Original comment by BryanNLawrence on 8 Jun 2012 at 12:57

GoogleCodeExporter commented 8 years ago
Have You tried to do :

 git clone https://207.97.227.239/xxxx/repo 

Instead of doing:

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

?

Original comment by lsiwinski on 8 Jun 2012 at 5:22

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

Original comment by BryanNLawrence on 8 Jun 2012 at 8:12

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

Original comment by lsiwinski on 9 Jun 2012 at 3:31

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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 ...

Original comment by BryanNLawrence on 9 Jun 2012 at 8:44

GoogleCodeExporter commented 8 years ago
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!

Original comment by BryanNLawrence on 11 Jun 2012 at 9:04

GoogleCodeExporter commented 8 years ago
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, <terminal-ide@googlecode.com> napisa�(a):

Original comment by lsiwinski on 11 Jun 2012 at 10:27

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

Original comment by TruSktr on 24 Jul 2012 at 11:34

GoogleCodeExporter commented 8 years ago
Additional info - I have defined such alias in ~/.bashrc (or
~/.bash_aliases):

alias ssh='ssh -i ~/.ssh/id_rsa'
25-07-2012 01:34, <terminal-ide@googlecode.com> napisa�(a):

Original comment by lsiwinski on 25 Jul 2012 at 6:15

GoogleCodeExporter commented 8 years ago
Hi, comment #3 works for me, thanks

Original comment by ma...@bernawebdesign.ch on 13 Sep 2012 at 2:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I was able to get it to clone now but. When I push it gives me cannot exec 
git-remote-https

Original comment by tim.prog...@gmail.com on 17 Aug 2013 at 4:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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...

Original comment by tim.prog...@gmail.com on 18 Aug 2013 at 2:39

GoogleCodeExporter commented 8 years ago
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, <terminal-ide@googlecode.com> napisa�(a):

Original comment by lsiwinski on 18 Aug 2013 at 10:35

GoogleCodeExporter commented 8 years ago
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????

Original comment by tim.prog...@gmail.com on 20 Aug 2013 at 1:22