I think it is more than worth of mentioning that you may need to generate a personal access token in GitHub, here https://github.com/settings/tokens , because user name and password is not enough for push and commit from Eclipse. Even though you have not switched on the 2FA in GitHub, you will still receive a message "Invalid credentials". So just use your personal access token instead of a password and you are good to go. I spent 2 hours trying...
Tutorials: https://developers.sap.com/tutorials/abap-environment-abapgit-transfer.html
I think it is more than worth of mentioning that you may need to generate a personal access token in GitHub, here https://github.com/settings/tokens , because user name and password is not enough for push and commit from Eclipse. Even though you have not switched on the 2FA in GitHub, you will still receive a message "Invalid credentials". So just use your personal access token instead of a password and you are good to go. I spent 2 hours trying...