0

I've recently set up a Git repository and after some fiddling managed to get everything set up correctly so that I could pull and push from Git in my Windows 8.1 environment using SSH keys and pulling from Gitlab ... however in my Ubuntu VM I try to do the same thing (all from command line by the way in both environments if that helps) and it starts asking me for a password which to me would suggest that the VM doesn't know the location of my SSH keys? I could be way off with that thought though.

I can quite happily check git status from the VM. This isn't the end of the world as I can use the Windows environment but I'm still learning all of this and wanted to know why it would be doing that ...

Thank you for any advise on the matter

Regards, Neil

Neil Kelsey
  • 811
  • 4
  • 13
  • 31
  • in your ubuntu environment, what are the permissions of `~/.ssh` and the files in that directory ? I assume that you did copy the private key across from Windows to Ubuntu (or set a new keypair between ubuntu & gitlab). – tgo Mar 01 '15 at 12:28
  • I need to copy the keys to the Ubuntu environment? Well I haven't done that ... Not sure how to check the permissions but it does seem that the folder exists **vagrant@homestead:~/Code/ahvla-beta$ ~/.ssh -bash: /home/vagrant/.ssh: Is a directory** – Neil Kelsey Mar 01 '15 at 12:38

1 Answers1

1

First, don't copy your windows keys in your Ubuntu ~/.ssh. The private key is called private for a reason ;)

Second, do check the permission of your new id_rsa and id_rsa.pub files that you need to generate in your new client environment (the Ubuntu one). A ls -alrt ~/.ssh will give you those information.

And if you regenerate new keys in that environment (See GitLab ssh documentation), don't forget to add the public key in your GitLab profile.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Didn't realise I needed to create some keys for the VM too, done, moved to the correct location and lined up with Gitlab, works great! Cheers guys – Neil Kelsey Mar 01 '15 at 13:21