使用 SSH 用户名和密码将 Git 项目导入 Aptana
我正在尝试为一些源代码设置 git 存储库,这是我第一次使用 git - 但我已经熟悉了所有概念和命令行基础知识,这应该让我现在开始。
我正在尝试让 Aptana Studio 3 在我的开发服务器上克隆我新创建的 Git Repo。我不知道如何传递 SSH 连接的用户名和密码。 Eclipse 的 EGit 允许我指定用户名和密码,并且看起来比 Aptana 的 git 实现先进得多,后者只要求我提供 URI 和路径。这将是 @:/path/to/git
我还发现由于某种原因我无法将 eGit 安装到 Aptana 中。它可能缺少 Eclipse 中包含的一些依赖项,但 Aptana 没有(Mylyn 似乎存在问题)。
我意识到我可以使用密钥,但这完全是现在使用用户名和密码的问题,我对设置密钥访问不感兴趣。
简而言之,有没有一种方法可以使用 Aptana Studio 3 的 Git 实现以及 SSH 的用户名和密码,而无需设置 RSA 密钥进行身份验证?如果 Aptana 的 Native 实现中没有,是否有办法安装不同的 Git 插件并使其工作。
感谢您抽出时间。 -卡尔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不使用 eclipse/Aptana,但去年我在通过 SSH 使用 git 中的子模块时遇到了类似的“问题”,也许我找到的解决方案可以为您工作。
当您在 git 中创建子模块时,存储库的完整 uri 将保存在
.gitmodules
文件中,例如:ssh://myuser@server/路径/to/repo.git
。问题是,由于 .gitmodules 受源代码控制,团队的其他成员如何在不干扰 .gitmodules 的情况下访问存储库?解决方案很简单:
1)我已将 .gitmodules 的 URL 更改为 ssh://server/paht/to/repo.git 。
2)我创建了一个包含以下内容的文件
~/.ssh/config
:这样,当git(或openSSH,我猜)尝试通过ssh连接时,他会搜索“服务器”我的
~/.ssh/config
中的条目,从那里获取用户名,只询问我的密码。也许通过这种方式,您可以“强制”Aptana 执行您想要的操作,而无需诉诸 RSA 密钥。
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: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.