How to get Aptana Studio to remember git ssh password

点点圈 提交于 2019-12-08 16:42:07

问题


I can't find any guides/information on how to get Aptana Studio's built-in git support to remember the ssh password for performing push/pull operations.

Does anybody have any ideas?


回答1:


Aptana Studio, actually its the built in GIT program, will look for your SSH key in your C:\Users\UserName.ssh folder on Windows.

NO!. The real path would be

%HOME%\.ssh\id_rsa --> for RSA keys, change the prefix if your key is DSA




回答2:


On Linux I have my ssh config file ( ~/.ssh/config ) as follows

Host github.com
    User MyUsername
    IdentityFile=/home/MyUsername/.ssh/MySshKey`

If you have a key with a password, you'll need something like ssh-agent or other app so you only have to enter your key password one time.




回答3:


You need to make sure that Aptana is asking for a password because:

  • your private key is found and is passphrase-protected
  • or because no SSH key is found at all (and SSH defaults back to common authentication)

It also depends on what SSH exe you are using, as this thread mentions:

Aptana Studio sets GIT_SSH environment variable to it's internal program which handles SSH password/passphrase prompt in common conditions.
In case you replacing default ssh.exe executable by setting GIT_SSH to plink.exe, to work with Aptana Studio you also need to set SSH_CMD to the same plink.exe path.

By default, Aptana uses:

[path_to_aptana_studio]/plugins/com.aptana.git.core_[version]/os/win32/sshw.exe



回答4:


Aptana Studio, actually its the built in GIT program, will look for your SSH key in your C:\Users\UserName.ssh folder on Windows.

To see if this key is working. First the server must have your public key and you set up the correct remote path to the repository. Then try a normal ssh username@host, if you can log in with the ssh key phrase you should be able to start using git to the remote.

To be able not to have to enter the ssh key phrase every time you want to connect to the remote you could either not have a ssh key phrase.

SSH login without password

Or you need some extra program that saves the password and enters it for you. A so called ssh agent.

Using ssh-agent with ssh

Maybe if you install Egit and uses this instead of Aptanas Git. Its probably possible to have it save your ssh key phrase. (Not verified!)




回答5:


The super easy way to do it is just to include it in the url when you're importing the git repository.

EG: https://UserName:Password@www.yourserver.com/repo.git

Of course, you'll only want to use this trick with https urls.



来源:https://stackoverflow.com/questions/10597789/how-to-get-aptana-studio-to-remember-git-ssh-password

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!