Hi @jurajbgh, there are two main ways to accompilsh this, the first is authenticating with SSH - you can read GitHub's articles to help you with setting this up, however, it's more advanced.
The second way is using HTTPS and providing your username and password in the URL. For example if I was cloning a public repository I might use:
git clone https://github.com/strafe/project.git
but if the repository was private then I'd use:
git clone https://strafe:email@example.com/strafe/project.git
Please note if you use 2FA to secure your GitHub account then you'll need to use a personal access token instead of your password, this article explains how to.
Hi, might be possible that authentication fails when using HTTPS and providing your username and password in the URL in case the password contains special chars (case example: p@ssword )?
If you have a special character in your password, replace it with values from this website https://support.brightcove.com/special-characters-usernames-and-passwords case example: p@ssword --> p%40ssword
For anyone else reading, know that using the
git clone https://myusername:firstname.lastname@example.org/myusername/project.git
way of doing things will cause your password to be written into the repo you just cloned in several different places, most notably the remote url. Do not do this if you are planning to share access to your clone with anyone!