I recently started using git on windows 7 and configured everything to access Github, Bitbucket and a private server over ssh.
Now I am switching to Ubuntu OS and I am not sure how to copy the keys and configuration settings over to Ubuntu.
Will you please help me out or point me in the direction of how to do it right ?
To build upon Hi-Angel's answer:
.git
directory at the root of your repository/project.C:\Users\<user_name>\.gitconfig
.C:\Users\<user_name>\.ssh
(at least, this is the standard)..git
directory at the root of your repository/project (no change and no work here).~/.gitconfig
.~/.ssh
(at least, this is the standard).Copy your .gitconfig
and .ssh
folders from one to the other and you should be good to go.
If you configured some things specific to your OS (such as default editors), you will have to configure those again or reset them after performing the copy, but this cannot be avoided.
You may consider it a hassle, but if one of your computers is a laptop, I would recommend configure separate SSH keys. That way, if your laptop ever gets stolen, you can remove the key and this laptop will never be able to mess with your central repository.
It may not seem that important for codes, but if you use SSH for other purposes (like administering your private server), I think it is crucial to be able to select which computers are allowed to connect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With