When you consider the github/gitlab settings in your ~/.ssh/config
-file
you may appreciate what's happening. You're able to clone/push/pull only
when you're allowed to do so and the SSH keys can be used as an authentication
mechanism here.
Hopefuly this small course on ssh helps you understand what is happening here.