Skip to content

How to Store Git Credentials for VSCode


This will be a quick article about how to store Git credentials for VSCode. This is convenient so that VSCode doesn't ask for credentials each time you want to do a push/pull from GitHub.

How to Store Git Credentials

  • Open VSCode and then open a terminal window within VSCode.
  • Set credential helper to store $ git config --global credential.helper store
  • Global flag is used to associate credentials with all GitHub repos.

The following is the syntax used to store credentials:

$ git config credential.helper store
$ git push
Username: < type your username >
Password: < type your password >

At this point, your credentials will be used automatically when using the following:

$ git push
$ git pull

If for any reason the above doesn't work, it's because the Github email and your name are missing. Do the following:

  • Open a terminal
  • Type the following:
git config --global "email_Address"
git config --global "user_Name"
  • Retry pushing or pulling from the repo.