Jump to content


Key based authentication with OVA

OVA SSH Key Authentication

  • Please log in to reply
6 replies to this topic

#1 Dave

Dave

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 02 October 2013 - 03:19 PM

I have downloaded and installed the OVA version of Git Fustion and I have things running with Git Fusion attaching to the preconfigured / local perforce instance. Following the guide I was able to clone the "Misc" repo create the "A" file, commit, and push the file using "git push git@<ip here>:Misc"

I then created a user "bob" and uploaded a public key for him. Bob shows up in the Git Fusion web interface with no question mark, so I know both Fustion and Perforce know about the user. I updated my git config email and name, then created a file "B" and committed it. But when I try to push, I get prompted for a password. What am I doing wrong? Is it because I have not setup Git Fusion to allow individuals to maintain their own keys?

Thanks!

Dave

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 02 October 2013 - 04:19 PM

Do you have multiple keys in your .ssh directory? I frequently see issues where ssh isn't picking up the correct key. You may need to create an ssh config file:

http://nerderati.com...sh-config-file/

#3 Dave

Dave

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 02 October 2013 - 05:05 PM

Hi Matt!

Thanks for the response! :-)

I do not have multiple keys, in this case I only have 1 key. The interesting thing is if I remove the key from my .ssh directory, I can still push with git@host:Misc. So if I have one or zero keys in my .ssh folder, the bahvior is the same.

Thanks!

Dave

#4 Dave

Dave

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 02 October 2013 - 05:07 PM

Another thought I just had (from reading the link you provided) is that the unix account I am trying to access the Git Fusion server from is not "bob" the user account is "dave". Not sure if this changes things, again if I do "git push git@server.ip:Misc" it works fine with or without any keys in the .ssh directory...

#5 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 02 October 2013 - 08:06 PM

The SSH key is used to identify the user in Perforce; so if Dave has a copy of Bob's private key in his ~/.ssh directory and does a 'git push git@server.ip:Misc' Perforce will see the key that is used and say "this is Bob!". Does Dave have any keys in his "~/.ssh" directory? What user can you successfully push as? SSH won't let you connect without a valid key or password, so it's getting authenticated somehow! =)

I know this is all clear as mud; ssh management is the biggest pain in Git. Once we get past the keys it should be smooth sailing.

#6 Dave

Dave

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 03 October 2013 - 02:27 PM

Thank you again for the quick reply!

I don't know what I had managed to do, but I verified the keys were gone from my .ssh directory, I removed the keys from Fusion through the web interface, and retested my scenerios. After that things started working as expected. I was not able to commit without the keys, and I was able to commit with them. So I don't know what I did, but it totally works as expected now.

Thank you for your time!

Dave

#7 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 03 October 2013 - 03:17 PM

Glad to hear it works now!





Also tagged with one or more of these keywords: OVA, SSH, Key, Authentication

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users