logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

git-credential-store.1 (5087B)


  1. '\" t
  2. .\" Title: git-credential-store
  3. .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-CREDENTIAL\-STORE" "1" "2025-03-14" "Git 2\&.49\&.0" "Git Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-credential-store \- Helper to store credentials on disk
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. git config credential\&.helper \*(Aqstore [<options>]\*(Aq
  36. .fi
  37. .SH "DESCRIPTION"
  38. .if n \{\
  39. .sp
  40. .\}
  41. .RS 4
  42. .it 1 an-trap
  43. .nr an-no-space-flag 1
  44. .nr an-break-flag 1
  45. .br
  46. .ps +1
  47. \fBNote\fR
  48. .ps -1
  49. .br
  50. .sp
  51. Using this helper will store your passwords unencrypted on disk, protected only by filesystem permissions\&. If this is not an acceptable security tradeoff, try \fBgit-credential-cache\fR(1), or find a helper that integrates with secure storage provided by your operating system\&.
  52. .sp .5v
  53. .RE
  54. .sp
  55. This command stores credentials indefinitely on disk for use by future Git programs\&.
  56. .sp
  57. You probably don\(cqt want to invoke this command directly; it is meant to be used as a credential helper by other parts of git\&. See \fBgitcredentials\fR(7) or \fBEXAMPLES\fR below\&.
  58. .SH "OPTIONS"
  59. .PP
  60. \-\-file=<path>
  61. .RS 4
  62. Use
  63. \fI<path>\fR
  64. to lookup and store credentials\&. The file will have its filesystem permissions set to prevent other users on the system from reading it, but it will not be encrypted or otherwise protected\&. If not specified, credentials will be searched for from
  65. \fB~/\&.git\-credentials\fR
  66. and
  67. \fB$XDG_CONFIG_HOME/git/credentials\fR, and credentials will be written to
  68. \fB~/\&.git\-credentials\fR
  69. if it exists, or
  70. \fB$XDG_CONFIG_HOME/git/credentials\fR
  71. if it exists and the former does not\&. See also
  72. the section called \(lqFILES\(rq\&.
  73. .RE
  74. .SH "FILES"
  75. .sp
  76. If not set explicitly with \fB\-\-file\fR, there are two files where git\-credential\-store will search for credentials in order of precedence:
  77. .PP
  78. ~/\&.git\-credentials
  79. .RS 4
  80. User\-specific credentials file\&.
  81. .RE
  82. .PP
  83. $XDG_CONFIG_HOME/git/credentials
  84. .RS 4
  85. Second user\-specific credentials file\&. If
  86. \fI$XDG_CONFIG_HOME\fR
  87. is not set or empty,
  88. \fB$HOME/\&.config/git/credentials\fR
  89. will be used\&. Any credentials stored in this file will not be used if
  90. \fB~/\&.git\-credentials\fR
  91. has a matching credential as well\&. It is a good idea not to create this file if you sometimes use older versions of Git that do not support it\&.
  92. .RE
  93. .sp
  94. For credential lookups, the files are read in the order given above, with the first matching credential found taking precedence over credentials found in files further down the list\&.
  95. .sp
  96. Credential storage will by default write to the first existing file in the list\&. If none of these files exist, \fB~/\&.git\-credentials\fR will be created and written to\&.
  97. .sp
  98. When erasing credentials, matching credentials will be erased from all files\&.
  99. .SH "EXAMPLES"
  100. .sp
  101. The point of this helper is to reduce the number of times you must type your username or password\&. For example:
  102. .sp
  103. .if n \{\
  104. .RS 4
  105. .\}
  106. .nf
  107. $ git config credential\&.helper store
  108. $ git push http://example\&.com/repo\&.git
  109. Username: <type your username>
  110. Password: <type your password>
  111. [several days later]
  112. $ git push http://example\&.com/repo\&.git
  113. [your credentials are used automatically]
  114. .fi
  115. .if n \{\
  116. .RE
  117. .\}
  118. .SH "STORAGE FORMAT"
  119. .sp
  120. The \&.\fBgit\-credentials\fR file is stored in plaintext\&. Each credential is stored on its own line as a URL like:
  121. .sp
  122. .if n \{\
  123. .RS 4
  124. .\}
  125. .nf
  126. https://user:pass@example\&.com
  127. .fi
  128. .if n \{\
  129. .RE
  130. .\}
  131. .sp
  132. No other kinds of lines (e\&.g\&. empty lines or comment lines) are allowed in the file, even though some may be silently ignored\&. Do not view or edit the file with editors\&.
  133. .sp
  134. When Git needs authentication for a particular URL context, credential\-store will consider that context a pattern to match against each entry in the credentials file\&. If the protocol, hostname, and username (if we already have one) match, then the password is returned to Git\&. See the discussion of configuration in \fBgitcredentials\fR(7) for more information\&.
  135. .SH "GIT"
  136. .sp
  137. Part of the \fBgit\fR(1) suite