This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
12 Replies Last post: Jan 20, 2014 5:52 PM by Alex Dearden  
Raul Pinto Newbie 18 posts since
Sep 12, 2012
Currently Being Moderated

Sep 19, 2012 5:03 PM

Git over SSH with username/password doesn't work after password change

Dear Forum,

 

for our current project, we use a central, self-hosted, Git repository for a Ruby on Rails application. That Git repository is requested over SSH with username/password.

I once forgot my password, so is was resetted on the server, but RubyMine doesn't request it. No operation works (fetch, pull, push)

I'm using the built-in SSH executable.

This is from the RubyMine log:

2012-09-19 14:42:06,225 [  33259]   INFO -   #git4idea.push.GitPushDialog - collectInfoToPush...
2012-09-19 14:42:06,363 [  33397]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:42:06,363 [  33397]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" log --max-count=5 happyhours --name-status --pretty=format:%x01%h%x02%H%x02%ct%x02%an%x02%at%x02%ae%x02%cn%x02%ce%x02%p%x02%d%x02%s%x02%b%x02%B%x03 --encoding=UTF-8 --full-history --sparse -- .
2012-09-19 14:42:06,410 [  33444]   INFO -   #git4idea.push.GitPushDialog - collectInfoToPush | Collected commits to push. Push spec: {D:\Sources\Rails\order_pay\src_op=GitRemote{myName='origin', myUrls=[ssh://pinto@5.9.70.78:/opt/git/src_op.git], myPushUrls=[ssh://pinto@5.9.70.78:/opt/git/src_op.git], myFetchRefSpec='[+refs/heads/*:refs/remotes/origin/*]', myPushRefSpec='[+refs/heads/*:refs/remotes/origin/*]'} refs/heads/happyhours->refs/remotes/}, commits: 691560fb27af34f5df223413ced34529168
2012-09-19 14:42:09,783 [  36817]   INFO -   #git4idea.push.GitPushDialog - getPushInfo start
2012-09-19 14:42:09,783 [  36817]   INFO -   #git4idea.push.GitPushDialog - getPushInfo | refresh is needed, collecting...
2012-09-19 14:42:09,783 [  36817]   INFO -   #git4idea.push.GitPushDialog - collectInfoToPush...
2012-09-19 14:42:09,870 [  36904]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:42:09,870 [  36904]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" log --max-count=5 happyhours --name-status --pretty=format:%x01%h%x02%H%x02%ct%x02%an%x02%at%x02%ae%x02%cn%x02%ce%x02%p%x02%d%x02%s%x02%b%x02%B%x03 --encoding=UTF-8 --full-history --sparse -- .
2012-09-19 14:42:09,913 [  36947]   INFO -   #git4idea.push.GitPushDialog - collectInfoToPush | Collected commits to push. Push spec: {D:\Sources\Rails\order_pay\src_op=GitRemote{myName='origin', myUrls=[ssh://pinto@5.9.70.78:/opt/git/src_op.git], myPushUrls=[ssh://pinto@5.9.70.78:/opt/git/src_op.git], myFetchRefSpec='[+refs/heads/*:refs/remotes/origin/*]', myPushRefSpec='[+refs/heads/*:refs/remotes/origin/*]'} refs/heads/happyhours->refs/remotes/origin/happyhours}, commits: 691560fb27af34f5df223413ced34529168
2012-09-19 14:42:09,914 [  36948]   INFO -   #git4idea.push.GitPushDialog - getPushInfo | selectedCommits: 691560fb27af34f5df223413ced34529168
2012-09-19 14:42:09,921 [  36955]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:42:09,921 [  36955]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" push origin happyhours:happyhours
2012-09-19 14:53:38,050 [ 725084]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:53:38,050 [ 725084]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" checkout master
2012-09-19 14:53:38,661 [ 725695]   INFO - a.repo.GitUntrackedFilesHolder - GitUntrackedFilesHolder: Index has changed, marking file://D:/Sources/Rails/order_pay/src_op recursively dirty
2012-09-19 14:53:49,863 [ 736897]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:53:49,863 [ 736897]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" pull --no-stat -v --progress origin master
2012-09-19 14:54:02,578 [ 749612]   INFO -    #git4idea.update.GitFetcher - fetching D:\Sources\Rails\order_pay\src_op
2012-09-19 14:54:02,581 [ 749615]   INFO -   git4idea.commands.GitHandler - cd D:\Sources\Rails\order_pay\src_op
2012-09-19 14:54:02,581 [ 749615]   INFO -   git4idea.commands.GitHandler - "D:\Program Files (x86)\Git\bin\git.exe" fetch --prune origin
2012-09-19 14:54:05,054 [ 752088]   INFO -    #git4idea.update.GitFetcher - Error fetching: [com.intellij.openapi.vcs.VcsException: fatal: The remote end hung up unexpectedly]

 

I'm using RubyMine 4.5.4 with git 1.7.11.msysgit.1 on Windows 7 x64

 

Any ideas?

 

Yours

Raul

Kevin McCaughey Newbie 50 posts since
Apr 21, 2012
Currently Being Moderated
Sep 19, 2012 7:25 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

I am a noob, but in my experience of setting up remote (lniux) servers, I always disable password logon on enabling SSH login (it seems standard practice). With that in mind, have you tried just using your username and leaving the password blank? Long shot, but just a thought The idea is that the key should confirm your identity?

Kevin McCaughey Newbie 50 posts since
Apr 21, 2012
Currently Being Moderated
Sep 27, 2012 1:35 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

[quote]Caused by: java.net.UnknownHostException:[/quote]

 

Something isn't right about your keys and it cannot authenticate. Do you have a .ssh (hidden) folder in your home directory and have you added (either manually or using.... um I forget but you can google) your Id_rsa (or is it id_rsa.pub?) to the list of keys? I mean adding one part of your key to the machine you are trying to connect to and the other in your .ssh folder.

 

Sorry, there are probably people a lot more Linux experienced than me. I have done it multiple times, I have to set keys up every time I re-provision one of my VPS's, but I cannot remember the syntax as I am not primarily a linux user.

 

You can find a good guide in the basic and security setup section of the Linode library (anyone can access) at Linode.com.

Kevin McCaughey Newbie 50 posts since
Apr 21, 2012
Currently Being Moderated
Sep 27, 2012 2:11 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

I use Win 7x64 as well sometimes, though mostly a Ubuntu 12.04.1 VM with Rubymine/Git etc installe there (it's so much easier than running into constant windows 7 problems I found in the end). Anyway...

 

In Windows 7:

 

C:/Users/[YOUR USER]/.ssh is where git on windows stores it's keys.

 

But... I think I have an answer for you!

 

Rubymine uses a Java ssh which is not aware of your keys. Here is a post in Stack Exchange about it:

 

http://stackoverflow.com/questions/9582912/setup-git-over-ssh-in-rubymine-on-windows

 

That tells you what to do. You will need pageant running (putty program in the putty folder, can get from menu) if you use a passphrase as well as SSH. Just follow the instructions on the link I gave you.

 

Hopefully this will solve your problem, I think this is the reason for sure why it is not working.

Kevin McCaughey Newbie 50 posts since
Apr 21, 2012
Currently Being Moderated
Sep 27, 2012 5:00 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

Have you added the host in git and setup git with your details? (check git 101 for this). Also, you need to add the repo address:

 

cd [existing_git_repo]
git remote add origin git@github.com:caius/foo.git [replace git@github... with git@[IP ADDRESS]:[USER]/[nameofrepo.git]
git push origin master

IP adddress should be fine. If you have a name then better to use it, but it will just resolve the same anyway.

Kevin McCaughey Newbie 50 posts since
Apr 21, 2012
Currently Being Moderated
Sep 27, 2012 5:56 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

At this stage then I would file a support request. I can't think of anything else it might be. It just worked for me on both Windows and Linux.

 

One more thing you could try is check if you can connect to github. I'm sure you have an account, just make a fake project and check it's working. IF it is then it has to be something to do with the way your repository is setup or you have the wrong IP address, or it's being firewalled. That's all I can think of I'm afraid.

 

Good luck Please let us know when you find out what it is - I am really curious now.

Alex Dearden Newbie 2 posts since
May 6, 2012
Currently Being Moderated
Jan 20, 2014 5:52 PM in response to: Raul Pinto
Re: Git over SSH with username/password doesn't work after password change

As Kevin said, Rubymine uses a different binary for SSH and it might not be aware of your keys. I had the exact same issue you have so I told Rubymine to use the native SSH executable and that worked!

 

  1. go to Preferences-> Version Control-> Git
  2. set SSH executable to Native
  3. click Ok
  4. Try pushing again.
In my case it was pushing to Heroku but it did the trick. Good luck.

More Like This

  • Retrieving data ...