Is it possible to use both the github and bitbucket repo in personal computer.
if not, Let me know any other possibilities.
Thanks in advance.
Definitely YES. You can generate ssh key pair first, see How to generate, then go to . ssh directory, copy the content of id_rsa. pub, and paste into your github or bitbucket ssh setting area.
You use SSH for connecting to remote servers, which also includes managing your code using Git and syncing with remote repositories. Even though it is considered a good practice to have one private-public key pair per device, sometimes you need to use multiple keys and/or you have unorthodox key names.
Yes it is. You tell git where the remote code lives from a per-repository configuration file. You can even push to GitHub and Bitbucket from the same repository if you want to.
See here for more details: http://blog.lckymn.com/2013/03/11/git-push-to-pull-from-both-github-and-bitbucket/
One important piece will be connecting to each separately with SSH.
Your SSH keys should live in $HOME/.ssh
and can contain any number of keys. The default name for an SSH key is id_rsa
(or similar, depending on the protocol used to create it).
Try doing:
ls $HOME/.ssh
... to see what's in there.
I do what you are asking about myself and for me that brings up something like:
github-personal
github-personal.pub
bitbucket-work
bitbucket-work.pub
known_hosts
Where known_hosts
is a file that contains a list of the servers I connect to and the public keys associated with them. The other files that end in .pub
are my own public keys and the rest are my private keys.
You get your GitHub and Bitbucket keys into there by following their appropriate tutorials:
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