0

I have a project written in Python, hosted on Heroku, and which I've been working on in Eclipse/PyDev.

I can commit fine from inside Eclipse, and I can git push heroku master from the command line, but it would be much smoother if I could push a branch directly from Eclipse.

The problem is I'm getting the username and password login prompt in Eclipse for my heroku remote.

Is there any way to set this up to use my SSH key from Eclipse?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
Jamie Bull
  • 12,889
  • 15
  • 77
  • 116

1 Answers1

1

Is there any way to set this up to use my SSH key from Eclipse?

Set the ssh keys on your machine and then change the url of the cloned repository to the ssh protocol 'git@....`

Once your keys are set correctly you should not see the username password again.

P.S Once you set your keys and you have updated the repository url do a first time fetch/pull so your key will be added to the known_hosts file. (answer yes when prompt)

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • Thanks. For anyone else coming here, the full command is `git remote set-url heroku git@heroku.com:.git` – Jamie Bull Mar 29 '16 at 22:52
  • 1
    Of course. you have to update the urk once you have moved to ssh – CodeWizard Mar 29 '16 at 22:55
  • More info about it can be found here: http://stackoverflow.com/questions/36290616/git-pushing-to-wrong-repo-need-to-rename-my-local-repo-to-the-one-i-created-re/36290707#36290707 – CodeWizard Mar 29 '16 at 22:56