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-cache.1 (4353B)


  1. '\" t
  2. .\" Title: git-credential-cache
  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\-CACHE" "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-cache \- Helper to temporarily store passwords in memory
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. git config credential\&.helper \*(Aqcache [<options>]\*(Aq
  36. .fi
  37. .SH "DESCRIPTION"
  38. .sp
  39. This command caches credentials for use by future Git programs\&. The stored credentials are kept in memory of the cache\-daemon process (instead of being written to a file) and are forgotten after a configurable timeout\&. Credentials are forgotten sooner if the cache\-daemon dies, for example if the system restarts\&. The cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions\&.
  40. .sp
  41. 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\&.
  42. .SH "OPTIONS"
  43. .PP
  44. \-\-timeout <seconds>
  45. .RS 4
  46. Number of seconds to cache credentials (default: 900)\&.
  47. .RE
  48. .PP
  49. \-\-socket <path>
  50. .RS 4
  51. Use
  52. \fI<path>\fR
  53. to contact a running cache daemon (or start a new cache daemon if one is not started)\&. Defaults to
  54. \fB$XDG_CACHE_HOME/git/credential/socket\fR
  55. unless
  56. \fB~/\&.git\-credential\-cache/\fR
  57. exists in which case
  58. \fB~/\&.git\-credential\-cache/socket\fR
  59. is used instead\&. If your home directory is on a network\-mounted filesystem, you may need to change this to a local filesystem\&. You must specify an absolute path\&.
  60. .RE
  61. .SH "CONTROLLING THE DAEMON"
  62. .sp
  63. If you would like the daemon to exit early, forgetting all cached credentials before their timeout, you can issue an \fBexit\fR action:
  64. .sp
  65. .if n \{\
  66. .RS 4
  67. .\}
  68. .nf
  69. git credential\-cache exit
  70. .fi
  71. .if n \{\
  72. .RE
  73. .\}
  74. .SH "EXAMPLES"
  75. .sp
  76. The point of this helper is to reduce the number of times you must type your username or password\&. For example:
  77. .sp
  78. .if n \{\
  79. .RS 4
  80. .\}
  81. .nf
  82. $ git config credential\&.helper cache
  83. $ git push http://example\&.com/repo\&.git
  84. Username: <type your username>
  85. Password: <type your password>
  86. [work for 5 more minutes]
  87. $ git push http://example\&.com/repo\&.git
  88. [your credentials are used automatically]
  89. .fi
  90. .if n \{\
  91. .RE
  92. .\}
  93. .sp
  94. You can provide options via the credential\&.helper configuration variable (this example increases the cache time to 1 hour):
  95. .sp
  96. .if n \{\
  97. .RS 4
  98. .\}
  99. .nf
  100. $ git config credential\&.helper \*(Aqcache \-\-timeout=3600\*(Aq
  101. .fi
  102. .if n \{\
  103. .RE
  104. .\}
  105. .SH "PERSONAL ACCESS TOKENS"
  106. .sp
  107. Some remotes accept personal access tokens, which are randomly generated and hard to memorise\&. They typically have a lifetime of weeks or months\&.
  108. .sp
  109. git\-credential\-cache is inherently unsuitable for persistent storage of personal access tokens\&. The credential will be forgotten after the cache timeout\&. Even if you configure a long timeout, credentials will be forgotten if the daemon dies\&.
  110. .sp
  111. To avoid frequently regenerating personal access tokens, configure a credential helper with persistent storage\&. Alternatively, configure an OAuth credential helper to generate credentials automatically\&. See \fBgitcredentials\fR(7), sections "Available helpers" and "OAuth"\&.
  112. .SH "GIT"
  113. .sp
  114. Part of the \fBgit\fR(1) suite