Languages
[Edit]
EN

Git save password under windows

7 points
Created by:
AnnLen
1798

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
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.