ディレクトリ 検索
Guides gitattributes giteveryday gitglossary gitignore gitmodules gitrevisions gittutorial gitworkflows Administration git archive git bundle git clean git filter-branch git fsck git gc git instaweb git reflog Basic Snapshotting git add git commit git diff git mv git reset git rm git status Branching and Merging git branch git checkout git log git merge git mergetool git stash git tag Debugging git bisect git blame git grep Email git am git format-patch git request-pull git send-email External Systems git fast-import git svn Getting and Creating Projects git clone git init Git git annotate git archimport git bisect-lk2009 git check-attr git check-mailmap git check-ref-format git checkout-index git cherry git citool git column git credential git credential-cache git credential-store git cvsexportcommit git cvsimport git cvsserver git diff-files git diff-tree git difftool git fast-export git fetch-pack git fmt-merge-msg git get-tar-commit-id git gui git http-backend git http-fetch git http-push git imap-send git index-pack git interpret-trailers git ls-remote git ls-tree git mailinfo git mailsplit git merge-file git merge-index git merge-one-file git merge-tree git mktag git mktree git name-rev git notes git p4 git pack-objects git pack-redundant git pack-refs git parse-remote git patch-id git prune git prune-packed git quiltimport git receive-pack git remote-ext git remote-fd git remote-testgit git repack git replace git rerere git send-pack git sh-i18n git sh-setup git shell git show-branch git show-index git stripspace git unpack-file git unpack-objects git upload-archive git upload-pack git var git verify-commit git verify-tag git whatchanged git worktree Inspection and Comparison git describe git shortlog git show Miscellaneous api credentials api index gitcli gitcore tutorial gitcredentials gitcvs migration gitdiffcore githooks gitk gitnamespaces gitremote helpers gitrepository layout gitsubmodules gittutorial 2 gitweb gitweb.conf pack format User Manual Patching git apply git cherry-pick git rebase git revert Plumbing Commands git cat-file git check-ignore git commit-tree git count-objects git diff-index git for-each-ref git hash-object git ls-files git merge-base git read-tree git rev-list git rev-parse git show-ref git symbolic-ref git update-index git update-ref git verify-pack git write-tree Server Admin git daemon git update-server-info Setup and Config git git config git help Sharing and Updating Projects git fetch git pull git push git remote git submodule
テキスト

名称

git-credential-cache  -  Helper 临时将密码存储在内存中

概要

git config credential.helper 'cache [options]'

Description

该命令将内存中的凭证缓存供将来的 Git 程序使用。存储的凭证永远不会触及磁盘,并在可配置的超时后被遗忘。缓存可通过 Unix 域套接字进行访问,通过文件系统权限仅限于当前用户。

你可能不想直接调用这个命令;它意味着被 Git 的其他部分用作凭证助手。请参阅 gitcredentials [7]或EXAMPLES以下。

选项

--timeout <seconds>

缓存凭据的秒数(默认值:900)。

--socket <path>

使用<path>联系运行中的高速缓存守护进程(或启动一个新的高速缓存守护进程,如果未启动)。默认为$XDG_CACHE_HOME/git/credential/socket除非~/.git-credential-cache/在存在的情况下~/.git-credential-cache/socket使用。如果您的主目录位于网络安装的文件系统上,则可能需要将其更改为本地文件系统。您必须指定绝对路径。

控制daemon(守护进程)

如果您希望守护进程提前退出,并在所有缓存的凭据超时前忘记,则可以执行以下exit操作:

git credential-cache exit

示例

这个 helper 的重点是减少你输入用户名或密码的次数。例如:

$ git config credential.helper cache
$ git push http://example.com/repo.git
Username: <type your username>Password: <type your password>[work for 5 more minutes]$ git push http://example.com/repo.git[your credentials are used automatically]

您可以通过 credential.helper 配置变量提供选项(此示例将缓存时间降低到5分钟):

$ git config credential.helper 'cache --timeout=300'
前の記事: 次の記事: