How to use ssh in order to push data online to github, gitlab and others without a password

Github asks me always the login and password.

Is there a way so that I do  not have to type in the login and password. If you run scripts one after other, there is always input needed from the user and everything halts.

Use ssh authentication.