https://github.com/clarius/credentialmanager
Official docs site for https://github.com/devlooped/CredentialManager
https://github.com/clarius/credentialmanager
Last synced: 5 months ago
JSON representation
Official docs site for https://github.com/devlooped/CredentialManager
- Host: GitHub
- URL: https://github.com/clarius/credentialmanager
- Owner: clarius
- License: mit
- Created: 2021-09-03T16:25:44.000Z (almost 5 years ago)
- Default Branch: gh-pages
- Last Pushed: 2025-08-28T20:28:53.000Z (11 months ago)
- Last Synced: 2025-10-22T18:03:14.828Z (9 months ago)
- Language: HTML
- Homepage: https://clarius.org/CredentialManager
- Size: 30.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.html
- License: license.txt
Awesome Lists containing this project
README
 Git Credential Manager Lib
============
[](https://www.nuget.org/packages/Devlooped.CredentialManager)
[](https://www.nuget.org/packages/Devlooped.CredentialManager)
[](https://github.com/devlooped/CredentialManager/blob/main/license.txt)
[](https://github.com/devlooped/CredentialManager/actions)
*This project uses [SponsorLink](https://github.com/devlooped#sponsorlink)
and may issue IDE-only warnings if no active sponsorship is detected.*
Packages the official [Git Credential Manager](https://github.com/git-ecosystem/git-credential-manager/) cross-platform credential store
implementation supporting Windows, macOS and Linux for use as a NS2.0 library with no UI or external dependencies.
Release version numbers track the [GCM releases](https://github.com/GitCredentialManager/git-credential-manager/releases) themselves.
## Usage
```csharp
using GitCredentialManager;
...
ICredentialStore store = CredentialManager.Create("myapp");
// Store a credential
store.AddOrUpdate("https://foo.com", "myusr", "mypwd");
// Retrieve a credential
ICredential cred = store.Get("https://foo.com", "myusr");
Assert.Equal("myusr", cred.Account);
Assert.Equal("mypwd", cred.Password);
```
The namespace for the `CredentialManager` static factory class is the same as the official GCM itself
for convenience: `GitCredentialManager`.
The optional *namespace* argument (`myapp` above) can be used to scope credential
operations to your own app/service.
The library targets .NET Standard 2.0 for broad applicability.
Supported [credential stores](https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/credstores.md) and their
configuration is shared with the GCM project itself.
> [!IMPORTANT]
> If you use Git's built-in credential cache, a working installation of git
> is required. See [GCM docs](https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/credstores.md#gits-built-in-credential-cache).
## Releasing
To create a new release:
1. Find & replace the latest release tag in this project to the desired release tag in
the [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) project
in the .netconfig file
2. Run `dotnet file sync -c:$env:TEMP\dotnet-file.md`
3. Use the contents of the generated file to update the release notes in the GitHub release.
If no useful notes were generated, just copy the GCM ones.
4. Create a PR like [this one](https://github.com/devlooped/CredentialManager/pull/111)
5. Once merged, create a matching release in this project.
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/torutek-gh)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/twenzel)
[](https://github.com/unoplatform)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/davidjenni)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/akunzai)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/v-limo)
[](https://github.com/jordansjones)
[](https://github.com/DominicSchell)
[](https://github.com/jwendl)
[](https://github.com/adalon)
[](https://github.com/Eule02)
[](https://github.com/sailro)
[](https://github.com/torutek)
[](https://github.com/sponsors/devlooped)
[Learn more about GitHub Sponsors](https://github.com/sponsors)