7

Does github require all cloning, of both public and private repositories, to use an SSH public key? Maybe a better question, is can git clone a github repo without a ssh key at all.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
Stephan Smith
  • 71
  • 1
  • 2

3 Answers3

4

You can use https protocol, as mentioned in "GitHub - Https access".
You would then use your GitHub login/password in a ~/.netrc file (which can be a security concern).
Note: on Windows, that would be an _netrc file.

Since GitHub supports smart http protocol (as detailed here), you can use that for cloning/pulling and for pushing.

smart http

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

SSH Key is used for more safety communication. Is not necessary, although using SSH Key is usefull because encrypte communication and also does not involve password.

canibal_uruguayo
  • 93
  • 1
  • 1
  • 8
-3

No. A SSH key is only needed to push to a public repo on github, not to pull from one (although the easiest method to get a clone you can later push to uses the same key to pull as to push, that isn't the only way to work).

Jonathan Callen
  • 11,301
  • 2
  • 23
  • 44