When you consider the github/gitlab settings in your
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
Hopefuly this small course on ssh helps you understand what is happening here.