Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing a Git Project into Aptana with SSH Username and Password

I am attempting to setup a git repo for some source code, this is the first time I have used git - but I have made my self familiar with all of the concepts and command line basics which should get me started for now.

I am trying to get Aptana Studio 3 to clone my newly created Git Repo on my development server. What I cannot figure out is how to pass in a Username and Password for the SSH connection. EGit for Eclipse lets me specify a username and password, and seems much more advanced than Aptana's git implementation which only asks me for URI and Path. Which would be @:/path/to/git

I have also found that I cannot for some reason install eGit into Aptana. Its probably missing some dependencies included with Eclipse, but not Aptana (Mylyn is what appears to be having the issues).

I realize that I can use keys, but this is strictly a question of using username and password right now and not am to interested in setting up keyed access.

So in short is there a way to use Aptana Studio 3's Git implementation with a Username and Password for SSH without having to setup RSA Keys for authentication? If there is not in Aptana's Native implementation, is there a way to install a different Git plugin and make it work.

Thanks for your time. -Karl

like image 680
Karl Carpenter Avatar asked Nov 13 '22 18:11

Karl Carpenter


1 Answers

I don't use eclipse/Aptana, but last year I had a similar "problem" when working with submodules in git via SSH, and maybe the solution I found can work for you.

When you create a submodule in git, the full uri of the repository is saved in the .gitmodules file, for example: ssh://myuser@server/paht/to/repo.git. The problem is that since .gitmodules is under source control, how the rest of the team will access the repository without messing with the .gitmodules?

The solution is simple:

1) I've changed the URL of .gitmodules to ssh://server/paht/to/repo.git. 2) I've created a file ~/.ssh/config with the following content:

Host server
  HostName <ip-of-the-server>
  User myuser

This way, when git(or openSSH, I guess) tries to connect via ssh, he searchs for a "server" entry in my ~/.ssh/config, grabs the username from there and only asks me my password.

Maybe this way you can "force" Aptana to do what you want, without resorting to RSA keys.

like image 114
Rafael Ibraim Avatar answered Dec 09 '22 09:12

Rafael Ibraim