Skip username prompt when using git

For both HTTP(S) and SSH, the username can be specified as part of the URL in [email protected] form:

If necessary, use git remote set-url or directly edit the .git/config file.

Easiest Solution:

From your git root directory, edit the config file .git/config.

You should see a section that looks like the following:

[remote "origin"]
        url =

What you want to do is add your username@ directly after the https://. As such:

[remote "origin"]
        url = https://[email protected]/xxx/xxx.git

Save and close this config file, and Git will no longer prompt you for your username when within that repo.