-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* jk/credentials: t: add test harness for external credential helpers credentials: add "store" helper strbuf: add strbuf_add*_urlencode Makefile: unix sockets may not available on some platforms credentials: add "cache" helper docs: end-user documentation for the credential subsystem credential: make relevance of http path configurable credential: add credential.*.username credential: apply helper config http: use credential API to get passwords credential: add function for parsing url components introduce credentials API t5550: fix typo test-lib: add test_config_global variant Conflicts: strbuf.c
- Loading branch information
Showing
28 changed files
with
2,427 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
git-credential-cache--daemon(1) | ||
=============================== | ||
|
||
NAME | ||
---- | ||
git-credential-cache--daemon - temporarily store user credentials in memory | ||
|
||
SYNOPSIS | ||
-------- | ||
[verse] | ||
git credential-cache--daemon <socket> | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
NOTE: You probably don't want to invoke this command yourself; it is | ||
started automatically when you use linkgit:git-credential-cache[1]. | ||
|
||
This command listens on the Unix domain socket specified by `<socket>` | ||
for `git-credential-cache` clients. Clients may store and retrieve | ||
credentials. Each credential is held for a timeout specified by the | ||
client; once no credentials are held, the daemon exits. | ||
|
||
GIT | ||
--- | ||
Part of the linkgit:git[1] suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
git-credential-cache(1) | ||
======================= | ||
|
||
NAME | ||
---- | ||
git-credential-cache - helper to temporarily store passwords in memory | ||
|
||
SYNOPSIS | ||
-------- | ||
----------------------------- | ||
git config credential.helper 'cache [options]' | ||
----------------------------- | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
This command caches credentials in memory for use by future git | ||
programs. The stored credentials never touch the disk, and are forgotten | ||
after a configurable timeout. The cache is accessible over a Unix | ||
domain socket, restricted to the current user by filesystem permissions. | ||
|
||
You probably don't want to invoke this command directly; it is meant to | ||
be used as a credential helper by other parts of git. See | ||
linkgit:gitcredentials[7] or `EXAMPLES` below. | ||
|
||
OPTIONS | ||
------- | ||
|
||
--timeout <seconds>:: | ||
|
||
Number of seconds to cache credentials (default: 900). | ||
|
||
--socket <path>:: | ||
|
||
Use `<path>` to contact a running cache daemon (or start a new | ||
cache daemon if one is not started). Defaults to | ||
`~/.git-credential-cache/socket`. If your home directory is on a | ||
network-mounted filesystem, you may need to change this to a | ||
local filesystem. | ||
|
||
CONTROLLING THE DAEMON | ||
---------------------- | ||
|
||
If you would like the daemon to exit early, forgetting all cached | ||
credentials before their timeout, you can issue an `exit` action: | ||
|
||
-------------------------------------- | ||
git credential-cache exit | ||
-------------------------------------- | ||
|
||
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 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] | ||
------------------------------------ | ||
|
||
You can provide options via the credential.helper configuration | ||
variable (this example drops the cache time to 5 minutes): | ||
|
||
------------------------------------------------------- | ||
$ git config credential.helper 'cache --timeout=300' | ||
------------------------------------------------------- | ||
|
||
GIT | ||
--- | ||
Part of the linkgit:git[1] suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
git-credential-store(1) | ||
======================= | ||
|
||
NAME | ||
---- | ||
git-credential-store - helper to store credentials on disk | ||
|
||
SYNOPSIS | ||
-------- | ||
------------------- | ||
git config credential.helper 'store [options]' | ||
------------------- | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
NOTE: Using this helper will store your passwords unencrypted on disk, | ||
protected only by filesystem permissions. If this is not an acceptable | ||
security tradeoff, try linkgit:git-credential-cache[1], or find a helper | ||
that integrates with secure storage provided by your operating system. | ||
|
||
This command stores credentials indefinitely on disk for use by future | ||
git programs. | ||
|
||
You probably don't want to invoke this command directly; it is meant to | ||
be used as a credential helper by other parts of git. See | ||
linkgit:gitcredentials[7] or `EXAMPLES` below. | ||
|
||
OPTIONS | ||
------- | ||
|
||
--store=<path>:: | ||
|
||
Use `<path>` to store credentials. The file will have its | ||
filesystem permissions set to prevent other users on the system | ||
from reading it, but will not be encrypted or otherwise | ||
protected. Defaults to `~/.git-credentials`. | ||
|
||
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] | ||
------------------------------------------ | ||
|
||
STORAGE FORMAT | ||
-------------- | ||
|
||
The `.git-credentials` file is stored in plaintext. Each credential is | ||
stored on its own line as a URL like: | ||
|
||
------------------------------ | ||
https://user:pass@example.com | ||
------------------------------ | ||
|
||
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 linkgit:gitcredentials[7] | ||
for more information. | ||
|
||
GIT | ||
--- | ||
Part of the linkgit:git[1] suite |
Oops, something went wrong.