0

I Created a Public Repository in my GitHub account To Share a Project with Others .

I tried to push my local project to it but it refused, i searched for it and i realized that we cant use username , password system anymore and most use SSH .

Does it really necessary for public Repositories?

i want anyone can clone or pull my project, but for pushing , just me .

So how should i use ssh to make it work?

Should i set a passphrase for it ?

Is there any better way to do this ?

torek
  • 448,244
  • 59
  • 642
  • 775
Selena MG
  • 43
  • 5
  • 1
    This question/answer is similar and may be helpful for your SSH question: https://stackoverflow.com/questions/30989718/why-is-a-machines-ssh-key-required-to-clone-a-public-git-repository Also, you will want to disallow pushing to master, which should make users submit changes to you via pull request: https://stackoverflow.com/questions/46146491/prevent-pushing-to-master-on-github – GeminiDakota Jul 07 '22 at 20:47
  • 1
    GitHub do still allow you to use username-and-password. They just call the password a "token" and require that you use GitHub facilities (to which you log in using your password) to *generate* the token, which you then put into your Git credential-helper, which calls the token a "password" (it is much like a password and should be treated like one, so that's kind of OK, and yet kind of confusing: just remember that it's GitHub that calls it a *token*, everyone *else* calls it a "password"). – torek Jul 08 '22 at 01:20
  • 1
    That aside, just make your repository private or public as you like. Use ssh or https as you like. Making a repository public does not automatically give *everyone* the rights to push directly to it. – torek Jul 08 '22 at 01:26

0 Answers0