Asking for your username when pushing is about authentication, not commit authorship.
Regarding authentication (credentials, username/password provided to a remote Git repository hosting service), you need to check your git config credential.helper
: that setting can setup a cache, avoiding to request your credentials every time you are pushing.
As the OP Pribhav comments, you can as in this answer, embed the username in the URL (https://username@site/...
).
Nut the credential.helper
is still needed to avoid asking for your password.