0

I am new to Github so this may seem trivial. I was supposed to create an ssh key for my Github account. I did that by typing the following command into Git Shell:

ssh-keygen -t rsa -C "rishikesh.330@gmail.com"

Prior to this, I had deleted my ssh key from github.com, so I had no keys in my Github before running the above command. On running the above command, a key was generated. When I opened github.com again, I saw a key, which I assume was this one. However, I accidentally deleted that key from github.com and added this new key that I had just created on Git Shell.

So does this mean that my github.com online account and my desktop Git Shell/Git Bash have two different ssh keys now? Should I be concerned if I intend to use my Git Bash to upload things to github.com?

lebowski
  • 1,031
  • 2
  • 20
  • 37
  • 1
    I'm unsure as to which key you deleted, but keys do not magically appear on github unless you manually paste them there. It says on the SSH keys page to *"Remove any keys you do not recognize"*, so it's safe - you can delete all keys, generate a new one, and use that. You didn't really generate a key, but a key *pair*, and gave the *public* part to github (by pasting it there), and kept the private key, well, private. Only if you have that private key that you just generated, that goes with the public key you pasted on github, can you access your repositories. – Kenney Feb 03 '16 at 02:49

1 Answers1

0

If you've applied the key, you've applied it to your account. So, if you're using git shell, then you can connect to your account using the ssh key you created in the shell and that you've applied to github by putting in the public part of the key. It doesn't really matter what client you're using to connect. So go ahead. If you need the private key at any stage when you're connecting, use the private part of the key whose public part you added to Github.

Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206