Is an SSH Key Required to clone a public github account?

蓝咒 提交于 2019-12-07 00:56:55

问题


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.


回答1:


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.




回答2:


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.




回答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).



来源:https://stackoverflow.com/questions/7502247/is-an-ssh-key-required-to-clone-a-public-github-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!