Skip to content

Commit ac73beb

Browse files
authored
Merge pull request #729 from miya789/main
Remove windows from `credential-cache` in `credstores.md`
2 parents 7c4cde4 + c0fbe95 commit ac73beb

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

docs/credstores.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ TTY device path, as returned by the `tty` utility.
178178

179179
## Git's built-in [credential cache](https://git-scm.com/docs/git-credential-cache)
180180

181-
**Available on:** _Windows, macOS, Linux_
181+
**Available on:** _macOS, Linux_
182182

183183
```shell
184184
export GCM_CREDENTIAL_STORE=cache

src/shared/Core/CredentialStore.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,11 @@ private static void AppendAvailableStoreList(StringBuilder sb)
152152
Environment.NewLine, StoreNames.Gpg);
153153
}
154154

155-
sb.AppendFormat(" {1,-13} : Git's in-memory credential cache{0}",
156-
Environment.NewLine, StoreNames.Cache);
155+
if (!PlatformUtils.IsWindows())
156+
{
157+
sb.AppendFormat(" {1,-13} : Git's in-memory credential cache{0}",
158+
Environment.NewLine, StoreNames.Cache);
159+
}
157160

158161
sb.AppendFormat(" {1,-13} : store credentials in plain-text files (UNSECURE){0}",
159162
Environment.NewLine, StoreNames.Plaintext);
@@ -286,6 +289,15 @@ private void ValidateGpgPass(out string storeRoot, out string execPath)
286289

287290
private void ValidateCredentialCache(out string options)
288291
{
292+
if (PlatformUtils.IsWindows())
293+
{
294+
throw new Exception(
295+
$"Can not use the '{StoreNames.Cache}' credential store on Windows due to lack of UNIX socket support in Git for Windows." +
296+
Environment.NewLine +
297+
$"See {Constants.HelpUrls.GcmCredentialStores} for more information."
298+
);
299+
}
300+
289301
// allow for --timeout and other options
290302
if (!_context.Settings.TryGetSetting(
291303
Constants.EnvironmentVariables.GcmCredCacheOptions,

0 commit comments

Comments
 (0)