{
    "mode": "man",
    "parameter": "git-credential-store",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/git-credential-store/1/json",
    "generated": "2026-06-15T14:09:10Z",
    "synopsis": "git config credential.helper 'store [<options>]'",
    "sections": {
        "NAME": {
            "content": "git-credential-store - Helper to store credentials on disk\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git config credential.helper 'store [<options>]'\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Note\nUsing this helper will store your passwords unencrypted on disk, protected only by\nfilesystem permissions. If this is not an acceptable security tradeoff, try git-\ncredential-cache(1), or find a helper that integrates with secure storage provided by\nyour operating system.\n\nThis command stores credentials indefinitely on disk for use by future Git programs.\n\nYou probably don’t want to invoke this command directly; it is meant to be used as a\ncredential helper by other parts of git. See gitcredentials(7) or EXAMPLES below.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--file=<path>\nUse <path> to lookup and store credentials. The file will have its filesystem permissions\nset to prevent other users on the system from reading it, but will not be encrypted or\notherwise protected. If not specified, credentials will be searched for from\n~/.git-credentials and $XDGCONFIGHOME/git/credentials, and credentials will be written\nto ~/.git-credentials if it exists, or $XDGCONFIGHOME/git/credentials if it exists and\nthe former does not. See also the section called “FILES”.\n",
            "subsections": []
        },
        "FILES": {
            "content": "If not set explicitly with --file, there are two files where git-credential-store will search\nfor credentials in order of precedence:\n\n~/.git-credentials\nUser-specific credentials file.\n\n$XDGCONFIGHOME/git/credentials\nSecond user-specific credentials file. If $XDGCONFIGHOME is not set or empty,\n$HOME/.config/git/credentials will be used. Any credentials stored in this file will not\nbe used if ~/.git-credentials has a matching credential as well. It is a good idea not to\ncreate this file if you sometimes use older versions of Git that do not support it.\n\nFor credential lookups, the files are read in the order given above, with the first matching\ncredential found taking precedence over credentials found in files further down the list.\n\nCredential storage will by default write to the first existing file in the list. If none of\nthese files exist, ~/.git-credentials will be created and written to.\n\nWhen erasing credentials, matching credentials will be erased from all files.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "The point of this helper is to reduce the number of times you must type your username or\npassword. For example:\n\n$ git config credential.helper store\n$ git push http://example.com/repo.git\nUsername: <type your username>\nPassword: <type your password>\n\n[several days later]\n$ git push http://example.com/repo.git\n[your credentials are used automatically]\n\n",
            "subsections": []
        },
        "STORAGE FORMAT": {
            "content": "The .git-credentials file is stored in plaintext. Each credential is stored on its own line\nas a URL like:\n\nhttps://user:pass@example.com\n\n\nNo other kinds of lines (e.g. empty lines or comment lines) are allowed in the file, even\nthough some may be silently ignored. Do not view or edit the file with editors.\n\nWhen Git needs authentication for a particular URL context, credential-store will consider\nthat context a pattern to match against each entry in the credentials file. If the protocol,\nhostname, and username (if we already have one) match, then the password is returned to Git.\nSee the discussion of configuration in gitcredentials(7) for more information.\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                        GIT-CREDENTIAL-STO(1)",
            "subsections": []
        }
    },
    "summary": "git-credential-store - Helper to store credentials on disk",
    "flags": [],
    "examples": [
        "The point of this helper is to reduce the number of times you must type your username or",
        "password. For example:",
        "$ git config credential.helper store",
        "$ git push http://example.com/repo.git",
        "Username: <type your username>",
        "Password: <type your password>",
        "[several days later]",
        "$ git push http://example.com/repo.git",
        "[your credentials are used automatically]"
    ],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Git helper to store passwords on disk.",
        "examples": [
            {
                "description": "Store Git credentials in a specific file",
                "command": "git config credential.helper 'store --file={{path/to/file}}'"
            }
        ]
    }
}