New github user with manny errors

Hello, community!I try to learn how to use git and Github and vs code.
I clone a repository(not mine), I open it in vs code…I make a little change in “read me”, but I can’t commit and push it.
The last error is : You don’t have permission to push to ‘name…’ on GitHub. Would you like to create a fork and push to it instead?
Can you tell me why? Maybe someone can help me.
I have tried for 6 hours but nothing…
Thank you

This is normal. If you clone a repository you simply download all the source and its history. However it seems the repository is not yours. You got a few options then. The most common one is to fork it (basically creating a copy of that repository or one of the branches). Since you forked it, the newly created repository is yours. If you want to contribute back to the ‘main’ project you can open up a Pull Request (PR) briefly explaining what you changed and why you think it would help the project.
You simply just don’t get write access to any repository. Think about it. Literally anyone could spam or inject malicious code if it would be open to public by default.

Thank you for your time! But if I make from vs code a new branch , why I can’t open a pull request? It tells me I am not authorized to make changes…

For example…If I want to work on your repository…First I have to fork it ,work on itt and then make a pull request?

Because you need to push the branch to somewhere public first. You can’t push your branch to someone else’s repository, so you need your own (a fork in GitHub terms).


I suggest you check GitHub Docs Fork a repo - GitHub Docs

1 Like