Languages
[Edit]
EN

Git save password under windows

7 points
Created by:
Wallace
636

1. Save git password with Windows Credential Manager

$ git config --global credential.helper manager

Steps:

  1. Run Git Bash
  2. Execute: $ git config --global credential.helper manager
  3. Execute: $ git pull or any other git command that requires authentication
  4. Windows credential manager will ask us for username and password
  5. Type username and password and click Ok
  6. All future git authentications for this git account will go from Windows credential manager

Great feature:
Our password is saved with Windows Credential Manager not as plain text.

Available from Git for Windows 2.7.3+ - github release

2. Save git password with git config credential

$ git config credential.helper store

Steps:

  1. Run Git Bash
  2. Execute: $ git config credential.helper store
  3. Execute: $ git pull or any other git command that requires authentication
  4. We will be asked to provide username and password to our git account
  5. Type username and password and click Ok
  6. All future git authentications for this git account will go from '.git-credentials' file

The password is stored as plain text in this file:

C:\Users\my_user_name\.git-credentials

Merged questions

  1. How do I save git credential under windows?
  2. Git - save username and password with windows
  3. How to safely store git credential under windows?
  4. Windows and git - save username and password.

References

  1. Git Credential Manager for Windows
  2. Windows Credential Manager
  3. Git config - docs
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Git

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join